Remaining Ruby 2.6 work
This issue is a catch-all for the unimplemented and tagged items during Ruby 2.6 compatibility work.
Original issue is #5576.
See also other incomplete issues #6149, #6157, #6158. #6159.
Language changes
- [ ] Refinements take place at block passing Feature #14223
- [ ] Refinements take place at Kernel#public_send Feature #15326
- [ ] Refinements take place at Kernel#respond_to? Feature #15327
- [x] Non-Symbol keys in a keyword arguments hash cause an exception. (This was later reverted as it was problematic to make such a change in 2.6. The larger change to kwarg handling was deferred until Ruby 3.0, with some changes and warnings in 2.7. See #6878.)
- [x] The “shadowing outer local variable” warning is removed. Feature #12490
- [x] Print
causeof the exception if the exception is not caught and printed its backtraces and error message. Feature #8257 (https://github.com/jruby/jruby/pull/6889)
Core classes updates (outstanding ones only)
Exception
- [ ] Exception#full_message takes
:highlightand:order options. Bug #14324
NameError
- [x] NameError.new accepts a
:receiveroption to set receiver in Ruby code. Feature #14313
NoMethodError
- [x] NoMethodError.new accepts a
:receiveroption to set receiver in Ruby code. Feature #14313
TracePoint
- [ ] “script_compiled” event is supported. Feature #15287
- [ ] TracePoint#parameters Feature #14694
- [ ] TracePoint#instruction_sequence Feature #15287
- [ ] TracePoint#eval_script Feature #15287
- [ ] TracePoint#enable accepts new keywords “target:” and “target_line:”.Feature #15289
Coverage
- [x] A oneshot_lines mode is added. Feature #15022
- [x] Add
:oneshot_lineskeyword argument to Coverage.start. - [ ] Add
:stopand:clearkeyword arguments to Coverage.result. Ifclearis true, it clears the counters to zero. Ifstopis true, it disables coverage measurement. - [x] Coverage.line_stub, which is a simple helper function that creates the “stub” of line coverage from a given source code.
NKF
- [ ] Upgrade to nkf v2.1.5
Compatibility issues (excluding feature bug fixes)
Dir
- [ ] Dir.glob with
'\0'-separated pattern list will be deprecated, and is now warned. Feature #14643
File
- [x] File.read, File.binread, File.write, File.binwrite, File.foreach, and File.readlines do not invoke external commands even if the path starts with the pipe character '|'. Feature #14245
Stdlib compatibility issues (excluding feature bug fixes)
These standard libraries have been promoted to default gems.
- [x] matrix
- [x] ostruct
- [x] prime
- [x] tracer
BigDecimal
- [x] BigDecimal.new will be removed in version 2.0.
- [x] BigDecimal creation with
exception: falsenever raises exception (still failing on master)
Pathname
- [x] Pathname#read, Pathname#binread, Pathname#write, Pathname#binwrite, Pathname#each_line and Pathname#readlines do not invoke external commands even if the path starts with the pipe character
'|'. This follows Feature #14245
@headius please review PR(https://github.com/jruby/jcodings/pull/31) This PR fixes caseMap for Georgian. I think you can remove the following exlclude tag.
test/mri/excludes/TestCaseMappingPreliminary.rb
exclude :test_georgian_capitalize, "unfinished in initial 2.6 work, #6161"
Thank you.
@k77ch7 Looks like @lopex included this in the jcodings 1.0.47 update. I'll confirm and remove the exclude. Thank you!
Exclude removed in 59a956975d.
The prime and tracer gems have been released:
- https://rubygems.org/gems/prime
- https://rubygems.org/gems/tracer
@headius @lopex please review PR(jruby/jcodings#32) This PR fixes treeStart for From_UTF8_MAC_Transcoder I think you can remove the following exlclude tag.
TestTranscode.rb
exclude :test_utf8_mac, "needs investigation"
&
TestCSVEncodings.rb
exclude :test_reading_with_most_encodings, "needs investigation, #6157"
exclude :test_regular_expression_escaping, "needs investigation, #6157"
these tests fail when UTF8-MAC encoding.
@k77ch7 Good find! I was wondering why we failed those CSV tests.
jcodings has been released with your fix and I'll push an update to JRuby shortly.
@headius @lopex please review PR(jruby/jcodings#33) This updates UTF32Encoding. I think you can remove the following exlclude tag.
TestUTF32.rb
exclude :test_mbc_newline, "Java ArrayIndex error"
Coverage's oneshot_lines mode was added in #6180. The missing line_stub method was added in #6185.
@k77ch7 Updated jcodings and encoding excludes in 8a848bdb5d.
@headius Thank you.
I create 2 PR(jruby/jcodings#34 and jruby/jcodings#35) to reduce TestTranscode failures.
@k77ch7 😍
@k77ch7 It looks like the jcodings changes have been merged, so we could do another release. Do you have any other patches in the works that we should wait for?
@headius No, I don't have any patches now. But I'm investigating other encoding test cases.
@k77ch7 @lopex jcodings has been released and updated on JRuby master.
@headius I create #6211 and jruby/jcodings#36 .
I believe these will fix test/mri/ruby/test_transcode.rb failures.
The matrix gem has a new release (ruby/matrix#12) so I've switched us back to using the gem.
- https://rubygems.org/gems/matrix
ostruct is the only remaining default gem for which we don't have a release.
@marcandre Thank you for getting an updated matrix release out! Only one to go!
Bugger... apparently just linking an issue to a PR willl close that issue. Bad design.
@headius I create jruby/jcodings#37 to reduce EncodingTest failures again.
@k77ch7 I'll get it merged in, thanks!
@k77ch7 Nice, those two tests have no excludes now!
Detargeting; a few of these are not supportable, and some others have their own issues. We'll leave this in place as a record of the bits we have not finished.
Actually most of the remaining items have been implemented or moved to their own issues.