JRuby 9.3.0.0 Released

Wednesday, September 22 2021

The JRuby community is pleased to announce the release of JRuby 9.3.0.0

JRuby 9.3.x is compatible with Ruby 2.6.x and stays in sync with C Ruby. As always there is a mix of miscellaneous fixes so be sure to read the issue list below.

With such a long development cycle, there are bound to be “dot zero” bugs and compatibility gaps, so we plan to release incremental fixes for JRuby 9.3 rapidly. We encourage users to file issues for any problems they encounter and join us in our Matrix chat room

Thank you to our excellent community of users for their many contributions! JRuby would not be successful without your help: @ahorek, @byteit101, @chrisseaton, @deivid-rodriguez, @edipofederle, @JasonLunn, @joshbressers, @k77ch7, @MariuszCwikla, @marshalium, @MikaelUrankar, @mkristian, @nomadium, @olleolleolle, @pirj, @ProfessorEugene, @pzygielo, @T45K, @thbar

These notes may be updated on the JRuby Wiki to include additional information and links to new or updated documentation: JRuby 9.3.0.0 Release Notes

Compatibility

  • Ruby language compatibility is updated to match Ruby 2.6.8. (#5576)
  • The require/load/autoload subsystem has been rewritten to better match Ruby behavior. This improves support for the Zeitwerk loader and fixes many long-standing issues. (#2794, #3656, #5403, #5466, #5590, #5618, #5638, #5717, #5763, #5764, #6347, #6445)
  • Improved logic for handling complex method and constant lookups, such as when prepends, refinements, or super calls are in play. Most known issues with these forms have been fixed. (596, #2155, #4678, #6271, #6712, #6777, #6778, #6785)

Standard Library

  • The standard library has been updated to match Ruby 2.6.8. Several libraries now use the official gems, allowing them to be upgraded independently of JRuby. (#4875, #6150, #6797, #6796, #6795, #6794, #6533, #6802)

Java Integration

  • JRuby supports Java versions 8 through 17, and should work well with any supported build of OpenJDK. Future versions of JRuby may drop support for Java 8 through 10, so we encourage users to upgrade older apps soon.
  • The Java integration logic for extending Java classes from Ruby has been rewritten to better support Java constructors and to reuse more logic from the rest of our Java integration library. This allows users to use those Ruby subclasses with Java frameworks that bootstrap using reflection, such as JavaFX. (#449, #2369, #4165, #5270, #6422)
  • JRuby now ships a new “jruby-base” jar artifact to Maven Central. This artifact provides a bare-bones JRuby jar file with no dependencies or standard libraries included. We may deprecate and remove the “jruby-core” artifact in the future, as it only provides Java dependencies and no standard libraries (users should prefer to build their own with jruby-base or use the jruby-complete artifact). (#6233)

340 Github Issues resolved for 9.3.0.0

  • #449 - support newInstance() with arguments
  • #596 - Adding a method to eigenclass doesn't work properly. Works in cruby
  • #713 - BEGIN/END blocks not executed in main compiled script
  • #985 - Kernel.spawn doesn't support some options (ex: :chdir)
  • #2150 - Dir#glob does not return files with proper cases
  • #2155 - Method#super_method finds something when super is undef'ed
  • #2369 - Can't subclass a Java class that calls an abstract function in its constructor
  • #2794 - Load/require logic lacks path caching and indexing found in MRI
  • #3656 - Autoload is not overwritten by subsequent explicit require
  • #4004 - Migrate Ruboto to JRuby 9K
  • #4165 - java_field causes NPE when using derived class of a java object
  • #4194 - "LoadError: no such file to load" if IOException is raised in loaded file
  • #4678 - Prepending a module to a module extended by a class gives NPE when calling `super`
  • #4688 - RubyEnumerator.SizeFn does not receive enough context
  • #4695 - Super does not mark literal blocks as escaped
  • #4875 - Ruby 2.5 Gemification
  • #4943 - Open3.open2e returns `Errno::ENOENT` in jRuby but runs fine on Ruby
  • #5126 - Status for MRI-related security issues?
  • #5143 - Eliminate static field references to JRuby state
  • #5200 - Core method call missing in exception backtrace on JRuby 9.2.0.0
  • #5219 - [ji] make inspect on Java proxies work
  • #5266 - use of JRUBY_OPTS="-Xreify.classes=true" causes Java::JavaLang::StackOverflowError:
  • #5270 - Concrete JRuby Implementations of Abstract Java Classes Can't be Constructed With Reflection
  • #5381 - only require 'java', users should explicitly require 'jruby'
  • #5401 - Disabling fixnum cache breaks racc JRuby implementation
  • #5403 - `autoload` should delegate to `require`
  • #5419 - Reinstate open-addressing hash to work on concurrency improvements.
  • #5466 - Weird `Kernel.autoload` behavior
  • #5469 - Add Array#difference
  • #5470 - Add Array#union
  • #5494 - Ruby 2.6: Add #to_h with block argument to Array, Enum, ENV, Hash and Struct
  • #5496 - Bump JRuby version and Ruby compat level to 2.6.0
  • #5498 - [ji] change RubyException#toJava to convert by default
  • #5502 - Ruby 2.6: Add a new #filter alias for #select
  • #5508 - Ruby 2.6: Add a new #then alias to Kernel#yield_self
  • #5519 - teardown with threads waiting gets ugly
  • #5530 - Ruby 2.6: Add new method Binding#source_location
  • #5535 - Ruby 2.6: Add Dir instance methods #each_child and #children
  • #5537 - Ruby 2.6: Hash#merge, Hash#merge! and Hash#update now accept multiple arguments
  • #5540 - Ruby 2.6: Add endless range
  • #5549 - Use `invoke` instead of `invokeExact` to avoid casting error on Android
  • #5552 - Ruby 2.6: Add support for endless range in more methods
  • #5555 - Ruby 2.6: Switch Range#=== to use cover? instead of include?
  • #5576 - Ruby 2.6 Support
  • #5590 - LOADED_FEATURES internal index not working correctly
  • #5599 - Object#pp changes visibility upon requiring 'pp'
  • #5601 - pp should always be private (port from MRI 2.6)
  • #5602 - [fix] properly calculate warning ($VERBOSE) default
  • #5618 - Performance issues with require_relative
  • #5638 - Zeitwerk compatibility check list
  • #5646 - Remove deprecated NativeException logic
  • #5681 - ArgumentError (not fully converted, 23 bytes left) with String.encode!
  • #5710 - Enumerator#any? and yield(*[[]]) bug
  • #5717 - Module#autoload (concurrently) blocks a second thread...hanging
  • #5732 - Do not bind accessors for Java interface-based constant values
  • #5763 - Refactor and optimize loaded features
  • #5764 - Rework load service, load path, loaded features, and autoload
  • #5857 - Even JRuby 9.2.8.0/ 9.2.11.1 terribly slow
  • #5896 - Hash#each raises ArgumentError with a method of arity 2 converted to a block
  • #5937 - port CGI.escapeHTML optimization
  • #5947 - Update FFI scripts and other files from FFI gem
  • #5948 - Update shared FFI code
  • #5949 - use optimized CGIEscape
  • #6010 - Ruby 2.6 : Add String#split with a blcok
  • #6011 - Ruby 2.6 : Add Random.bytes
  • #6033 - Ruby 2.6 : Enumerator::Chain class, Enumerable#chain, Enumerator#+
  • #6037 - Implement Ruby 2.6 features
  • #6045 - Bundler incorrect path resolution handling classloader URI
  • #6062 - Mark custom classloaders as parallel capable
  • #6063 - [RbConfig] add RUBY_SO_NAME and RUBY_BASE_NAME
  • #6064 - throw ArgumentError instead of SecurityError
  • #6065 - Add FFI::LastError.winapi_error
  • #6066 - remove struct by reference
  • #6075 - Restore the backtrace element for the `new` call
  • #6080 - Remove IRScope from JIT and add AOT bytecode caching
  • #6087 - Add IT for issue 6081
  • #6098 - Illegal reflective access by org.jruby.ext.openssl.SecurityHelper
  • #6100 - starting jruby: "An illegal reflective access operation has occurred"
  • #6104 - Pre-epoch times are rounded up by #to_i
  • #6106 - Ruby 2.6 : Enumerator::ArithmeticSequence class, Numeric#step, Range#step
  • #6108 - Round Time#to_i down rather than truncating
  • #6110 - Implement Thread#{set_trace_func, add_trace_func}
  • #6115 - java_import conflicts should get scoped properly
  • #6116 - Cleanups and improvements for java_import
  • #6117 - RubyTime initialization refactor
  • #6120 - Ruby 2.6 : fix Enumerable#to_h with block.
  • #6121 - Ruby 2.6 : fix Enumerator::Lazy#find_all and #filter
  • #6124 - StackOverflow after several hours after upgrading from JRuby 9.2.9 to 9.2.11
  • #6125 - undefined method `runtime' for JRuby:Module on Travis CI when running `rubocop` for `rspec-rails`
  • #6127 - Address dangling threads in Timeout module
  • #6129 - trouble when running 'rails server' in WSL
  • #6130 - InvalidTransformException with jruby-9.2.11.0 + invokedynamic=true
  • #6131 - LoadError: no such file to load -- racc/info
  • #6132 - Properly recombine varargs with method name for indy m_m
  • #6133 - Enhanced exit blocks
  • #6135 - Bump `json` version provided by default
  • #6139 - Uninitialized constant -- already exists
  • #6141 - Tie become_java! and concrete extension (fixes #4165)
  • #6142 - Thread didn't execute?
  • #6143 - Hold a hard reference to Ruby threads
  • #6144 - Audit constant assignment paths for ID vs Java strings
  • #6147 - --server argument warning pollutes standard output
  • #6150 - Source FFI Ruby sources from the gem
  • #6151 - Ruby 2.6 : fix Struct#to_h exception message
  • #6153 - Passing `:chdir` to `Kernel.system` doesn't work reliably
  • #6155 - handle Java 9+ warnings on windows
  • #6157 - CSV parsing and encoding errors in 2.6
  • #6158 - New Ripper features in 2.6
  • #6159 - Remaining parser/constant name issues in 2.6
  • #6166 - Remove usages of deprecated ConfigMap (again)
  • #6169 - strftime precision against combinated formats (ex. %F, %r, ...)
  • #6171 - webrick tests fail on jruby
  • #6172 - Update stdlib gems
  • #6173 - Evaluation of `when` more lazily evaluates multiple conditions on one line.
  • #6175 - Windows installer fails with Oracle JDK-14: Missing unpack200.exe
  • #6176 - Shut down threads on teardown
  • #6177 - Remove all remaining references to pack200
  • #6178 - Align 8 and 11 in github actions CI
  • #6180 - Implement oneshot_lines for coverage
  • #6181 - missing method, `Coverage.line_stub` doesn't exist
  • #6182 - [ji] java_import now raise NameError on invalid names
  • #6183 - Ruby 2.6 : fix StringIO#write method logic
  • #6185 - Implement Coverage.line_stub
  • #6188 - Thread not killed after calling #kill
  • #6189 - "Illegal reflective access operation"
  • #6190 - Restart dead enumerator
  • #6193 - File.fnmatch with File::FNM_PATHNAME doesn't treat [/a] or [a/] like [a] as MRI does
  • #6194 - Remove deprecated classes
  • #6197 - Missing method that is public but defined on a non-public superclass
  • #6199 - Allow public methods from non-public superclasses to bind
  • #6202 - Time.now is inconsistent with MRI and Java System time
  • #6203 - Raise Ruby exception in JRuby
  • #6205 - Duplicate jnr-ffi classes when combining jruby-core with jython-slim
  • #6209 - Update jnr-posix and jnr-ffi to get default image seach
  • #6211 - Ruby 2.6 : fix failing transcode tests.
  • #6212 - Timeout service shuts down before at_exits have run
  • #6213 - Reorder teardown and add a post-exit hook registry
  • #6214 - JRuby functionality under "denied" illegal access
  • #6220 - fix copy & paste error
  • #6221 - missing break
  • #6222 - FileOutputStream's cleanup
  • #6223 - flo_floor remove dead code
  • #6224 - synchronize totalMonomorphicCalls
  • #6225 - NoMethodError: undefined method `[]' for :Class</li>
  • #6226 - Fixes to improve support for chdir in spawn functions
  • #6228 - Default to space padding for "special" formats
  • #6231 - Update fnmatch implementation
  • #6233 - jruby base artifact
  • #6234 - Improved integration with Ruby and Java exceptions
  • #6236 - Small optimization roundup
  • #6238 - Heavy string benchmark slower than 1.7
  • #6239 - Don't double-slash path elements when canonicalizing
  • #6242 - Sorbet `srb init` crashes
  • #6246 - Fixes to get WEBrick tests greener
  • #6247 - `Etc::SC_OPEN_MAX` not defined
  • #6249 - Encoding experiments with file path negotiation
  • #6250 - implement Etc.sysconf
  • #6252 - Fix failling TestUTF16#test_succ
  • #6255 - Double splat with empty parameters fails to find child's empty arity method
  • #6258 - Heredocs and escaped \n
  • #6264 - Expose Java's built-in monitor synchronization as a JRuby API
  • #6266 - [etc] implement #confstr and #pathconf
  • #6267 - NoMethodError for ObjectSpace::WeakMap#values
  • #6268 - Fix reference type and avoid closing jar directly
  • #6269 - Avoid using URL.openStream due to JDK cache
  • #6271 - Prepending a module hides module's constants
  • #6273 - Only close temporary jars to avoid poisoning global jar file cache
  • #6276 - Fix typo to combine flags in the parser singleton class rule
  • #6279 - Some fixes, tweaks, and new tools for working with IR
  • #6286 - `require_relative` with Named Pipe Gives Incorrect Error
  • #6296 - Fixes to improve Java 11 testing
  • #6301 - Reconfigure some CI builds and add JDK14
  • #6311 - Fixes to get specs passing on Darwin and other things
  • #6312 - Implement IO#advise
  • #6313 - Do the read of the full file contents separately
  • #6314 - Loading PsychLibrary fails when temporary jar files do not have permissions to read pom of snakeyaml
  • #6315 - Deprecate and isolate all Options that are no longer used
  • #6316 - Mark literal blocks escaped when passed through a super call
  • #6318 - remove redundant Process.uid patch on windows
  • #6321 - Add self to SizeFn
  • #6330 - Add an option for specifying the nested jar temp location
  • #6340 - [ci] an attempt to run tests on Windows
  • #6341 - Propagate code range into Symbol and calculate hash like String
  • #6347 - prepend + extend_object still affecting CGI library
  • #6349 - bundle exec fails on Bundler 2 with config path and deployment
  • #6350 - IRReturnJump when returning from a proc returned by a lambda
  • #6351 - Consider both "argument scope" and lambda as return jump target
  • #6357 - RubySpec fixes for Windows
  • #6358 - Fix failing TestUTF16#test_regexp_union
  • #6360 - Fix inconsistency in #5837
  • #6363 - [test] Tag off remaining http failures.
  • #6364 - Fix test_greek_capital_gap failure.
  • #6369 - Avoid uncached isBuiltin and uncached calls in Enumerable
  • #6370 - Fallback primitive numeric ops to object dispatch
  • #6373 - [ffi] read_string should not throw an error on length 0
  • #6374 - [ffi] add bounds checks for writing to an inline char[]
  • #6375 - [ffi] update ffi to 1.13.1
  • #6376 - [ffi] ulong type looses precision in 64bit mode
  • #6377 - [ffi] Do NULL pointer check only when array length > 0
  • #6378 - fix failing TestM17N#test_utf_without_bom_valid
  • #6380 - Miscellaneous small optimizations
  • #6383 - Fixes for non-native execution
  • #6386 - Comparing Date object with nil sets global $! variable to NoMethodError
  • #6387 - Fix failing TestM17N#test_setbyte_range
  • #6388 - Update JNR to Java 8+ versions
  • #6390 - jrubyc: make valid java code when using annotations in java_signature
  • #6392 - restore $! on date comparisons
  • #6397 - jar:file: stat fails with error 123 on Windows
  • #6401 - define available constants
  • #6402 - Clean up compile warnings and deprecations on Java 14
  • #6404 - jrubyc has issues with mangled (target) path on Windows
  • #6406 - Allow ulong range values to coerce to long bits
  • #6410 - [ffi] fix libc name on Linux
  • #6412 - handle winstat errors
  • #6422 - Java-constructable Concrete Ruby Classes
  • #6425 - Update enxio to omit poll fd from key list
  • #6426 - Source ostruct from the 0.3.0 gem
  • #6429 - Fixes #6428: Date._strptime raises Java exception on invalid argument
  • #6431 - Fix platform type inititilization
  • #6438 - Fixes #6404 jrubyc: mangled ("--target") path on Windows
  • #6441 - [parser bug] NPE on a long case statement
  • #6445 - Method missing for prepended module
  • #6451 - Fix yielding to methods that take two params from Hash#each
  • #6456 - crash while marking used variables
  • #6457 - [embed] refactor (JSR223) exception wrapping
  • #6458 - bundle install on Windows fails with NotImplementedError: stat.st_gid unsupported or native support failed to load
  • #6460 - [windows] fix gid
  • #6462 - Update webrick to 1.6.1
  • #6469 - require 'parser' - ArrayIndexOutOfBoundsException
  • #6474 - OperatorCallNode was missing from NodeVisitor, add it
  • #6479 - Java Interface Default methods not properly supported
  • #6481 - Update JNR
  • #6484 - [ji] bind interface default methods
  • #6485 - require 'bundler' should prefer the gemified version
  • #6486 - Make bundler a proper default gem
  • #6488 - Sequel CI failures with ActiveSupport 6.1
  • #6493 - [ji] "usable" inspect for core Java types
  • #6494 - Timezone fixes for 2.6 logic
  • #6496 - Spec sweep
  • #6497 - Add unpack/pack 'j' and 'J' support
  • #6498 - Small spawn fixes
  • #6501 - Some simple spec fixes in ENV
  • #6503 - Cleanup FFI platform files
  • #6509 - [ffi] update to 1.14.2
  • #6513 - [ji] eliminate JavaClass usage in favor of Java wrappers
  • #6514 - javax.annotation-api has been deprecated, please move to jakarta-annotation-api
  • #6519 - Pathname#inspect behaviour is not consistent with other Ruby implementations
  • #6522 - optimize Array#unshift
  • #6524 - [Ripper] wrong number of arguments (given 1, expected 2) on DOT2/3
  • #6525 - Make Pathname#inspect behave like other Ruby implementations (fixes #6519)
  • #6533 - [deps] Update RubyGems to 3.2 and Bundler 2.2
  • #6534 - Move Monitor to native
  • #6535 - Work around EPERM fstat error for inotify under WSL
  • #6544 - Thread.handle_interrupt and pending_interrupt? spec failures
  • #6545 - Improve tagged pointer emulation
  • #6556 - [deps] update joda-time to latest
  • #6562 - [feat] support RubyString#split for Java (exts)
  • #6564 - Unexpected ArgumentError when calling method and splatting empty hash
  • #6569 - Improve compatibility of handle_interrupt
  • #6572 - Optimization for calling java vararg methods on hotspot. ~10x speedup
  • #6585 - Kill all use of Arity+
  • #6589 - RubyIO needs allocation-free read and write paths
  • #6590 - Provide direct byte[] read and write for RubyIO
  • #6591 - Improve JSR-223 exception messages
  • #6593 - fix getsockopt failure
  • #6594 - Use more lambdas for great justice
  • #6596 - Remove BSF support
  • #6597 - Remove the rest of Nailgun
  • #6601 - Update jnr-ffi and dependents
  • #6614 - More refactoring of block
  • #6616 - [stdlib] resolve Set#initialize compatibility
  • #6623 - Fixes #6564. Passing **kw to def with no args should work
  • #6628 - #dig slower with invokedynamic than without
  • #6630 - Provide a collector for indy varargs boxing
  • #6633 - Improve inlining of varargs path for split methods
  • #6643 - Reduce frame overhead for leaf blocks
  • #6646 - Do not assign backref from String#split
  • #6653 - Include overriding classes in backtrace mapping
  • #6660 - [ji] set Ruby/Java cause on RaiseException
  • #6661 - [refactor] move include_package into Java
  • #6662 - Marshal.load fails to unmarshal OpenStruct object
  • #6663 - ostruct 0.3.3
  • #6666 - Ruby 2.6 : Add :receiver option to NameError.new and NomethodError.new
  • #6672 - Ruby 2.6 : Update ioOpenGeneric for Pathname methods.
  • #6680 - Update to Psych 3.3.2
  • #6681 - Fix Dir.glob with cases
  • #6683 - Add all missing methods to WeakMap
  • #6684 - Move to jakarta-annotation-api
  • #6688 - Really fix #6158 ++
  • #6694 - Do not pollute CP with annotation-api
  • #6697 - [ffi] update to 1.15.1
  • #6698 - webrick 1.7.0
  • #6706 - Resolve Set#initialize compatibility
  • #6707 - Update wiki URLs to point directly to pages in warning messages
  • #6708 - Autoload regression
  • #6711 - [launcher] basename for solaris
  • #6712 - Fix some specs regarding method visibility
  • #6715 - Add syslog.rb for FreeBSD aarch64
  • #6718 - Current 9.3.0.0 subchild not properly registering the override of a parent with the reification cf 9.2.18.0 and earlier version.
  • #6728 - Fix undef with private method
  • #6732 - FFI issue loading libidn2 in macos
  • #6733 - Test on JDK 16
  • #6738 - Fixes #6173. Evaluation of when more lazily evaluates multiple conditions on one line.
  • #6744 - [ji] inspect for Thread/TimeZone/ZoneInfo
  • #6749 - Use the real module for Kernel autoload
  • #6751 - 9.3 : Gem::LoadError: You have already activated ffi 1.15.1, but your Gemfile requires ffi 1.15.3.
  • #6756 - Fixes #6242. Sorbet srb init crashes
  • #6757 - Fix failures in ruby/spec running with immediate jit mode
  • #6760 - Lazily define FFI-using File methods
  • #6762 - Actually fix File.symlink on Windows
  • #6772 - Merge lastline and other bits from 9.2
  • #6774 - fix failing TestBigDecimalUtil#test_String_to_d
  • #6777 - Prepend Fixage
  • #6778 - use optimized CGIEscape
  • #6785 - Fixes #6271. Prepending a module hides module's constants
  • #6787 - fix 5 failing BigDecimal tests
  • #6791 - restore api compatibility with nio4r
  • #6792 - Update JNR dependencies
  • #6793 - Update or revert FFI gem
  • #6794 - Update to jruby-openssl 0.10.7
  • #6795 - Update to 6.1.2.1 to match Ruby 2.6.8
  • #6796 - Update rexml to 3.1.9.1 to match ruby 2.6.8
  • #6797 - Update did_you_mean to 1.3.0 to match ruby 2.6.8
  • #6798 - Update owned dependencies backport9 and options
  • #6800 - Out of metaspace intermittently on Travis
  • #6802 - Update stdlib
  • #6803 - More agressively kill dead code
  • #6811 - Update jnr to fix junit dependency scoping
  • #6817 - b_nil should noop if compared against truthy immediate (IRBuilder)
  • #6818 - GC.start raises ArgumentError when passed named arguments
  • #6819 - Add optional argument to start and garbage_collect
  • #6820 - Fix super chaining on Ruby subclasses of Java classes
  • #6827 - reduce some repeated method calls
  • #6829 - Addrinfo#inspect add protocols
  • #6830 - Cannot call Varargs Java Methods
  • #6832 - "Syntax Error" occurs in "eval"
  • #6834 - Fix calling primitive varargs and add tests
  • #6835 - Revert ostruct tests/specs due to reverted gem
  • #6836 - Fix #6832. "Syntax Error" occurs in "eval"
  • #6837 - Fix string literals in other encodings which should be utf-8 encoding