New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 2.4 support #4293

Closed
headius opened this Issue Nov 14, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@headius
Member

headius commented Nov 14, 2016

This bug will track all NEWS items new in Ruby 2.4. This list is based off https://github.com/ruby/ruby/blob/trunk/NEWS.

Only changes relevant to JRuby are listed here. MRI-specific internal changes and features are not included.

NOTE: Pull requests should be done against the ruby-2.4 branch.

Language changes

Core classes updates (outstanding ones only)

  • Array

  • Comparable

  • Dir

  • Enumerable

  • Enumerator::Lazy

  • File

  • Float

    • Float#ceil, Float#floor, and Float#truncate now take an optional digits, as well as Float#round. Feature #12245

    • Float#round now takes an optional keyword argument, half option, and
      the default behavior is round-up. Bug #12548 Bug #12958
      half option can be one of :even, :up, and :down. Feature #12953

  • Hash

  • Integer

    • Integer#ceil, Integer#floor, and Integer#truncate now take an optional digits, as well as Integer#round. Feature #12245

    • Fixnum and Bignum are unified into Integer Feature #12005

    • Integer#digits for extracting columns of place-value notation Feature #12447

    • Integer#round now takes an optional keyword argument, half option, and
      the default behavior is round-up. Bug #12548 Bug #12958
      half option can be one of :even, :up, and :down. Feature #12953

  • IO

    • IO#gets, IO#readline, IO#each_line, IO#readlines, IO.foreach now takes an optional keyword argument, chomp flag. Feature #12553
  • Kernel

    • Kernel#clone now takes an optional keyword argument, freeze flag. Feature #12300
  • MatchData

  • Module

  • Numeric

  • Process

    • Support CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW, and CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12.
  • Rational

    • Rational#round now takes an optional keyword argument, half option, and
      the default behavior is round-up. Bug #12548 Bug #12958
      half option can be one of :even, :up, and :down. Feature #12953
  • Regexp

    • Regexp#match? Feature #8110
    • meta character \X matches Unicode 9.0 characters with some workarounds for UTR #51 Unicode Emoki, Version 4.0 emoji zwj sequences
    • Update Onigmo 6.0.0 (we have never incorporated all of Onigmo's additions into Joni)
  • Regexp/String: Updated Unicode version from 8.0.0 to 9.0.0 Feature #12513

  • String

    • String#upcase, String#downcase, String#capitalize, String#swapcase and their bang variants work for all of Unicode, and are no longer limited to ASCII. Supported encodings are UTF-8, UTF-16BE/LE, UTF-32BE/LE, and ISO-8859-1~16. Variations are available with options. See the documentation of String#downcase for details. Feature #10085

    • String.new(capacity: size) Feature #12024

    • String#concat, String#prepend Feature #12333 Now takes multiple arguments.

    • String#unpack1 Feature #12752

    • String#match? Feature #12898

    • String#each_line, String#lines now takes an optional keyword argument, chomp flag. Feature #12553

    • String#concat, String#prepend now take multiple arguments Feature #12333

    • String#casecmp? Feature #12786

  • StringIO

    • StringIO#gets, StringIO#readline, StringIO#each_line, StringIO#readlines now take optional keyword argument, chomp flag. Feature #12553
  • Symbol

    • Symbol#match now returns MatchData. Bug #11991

    • Symbol#upcase, Symbol#downcase, Symbol#capitalize, and Symbol#swapcase now work for all of Unicode. See the documentation of String#downcase for details. Feature #10085

    • Symbol#match? Feature #12898

    • Symbol#casecmp? Feature #12786

  • Thread

    • Thread#report_on_exception and Thread.report_on_exception Feature #6647
  • TracePoint

  • Warning

    • New module named Warning is introduced. By default it has only one singleton method, named warn. This makes it possible for 3rd-party libraries to control the way warnings are handled. Feature #12299

Stdlib updates (only items that need specific attention in JRuby)

  • pathname

  • Readline

    • Readline.quoting_detection_proc and Readline.quoting_detection_proc= Feature #12659

Compatibility issues (excluding feature bug fixes)

  • Array#sum and Enumerable#sum are implemented. Feature #12217

  • Fixnum and Bignum are unified into Integer Feature #12005

  • String/Symbol#upcase/downcase/swapcase/capitalize(!) now work for all of Unicode, not only for ASCII. Feature #10085

  • TRUE / FALSE / NIL These constants are now obsoleted. Feature #12574

Stdlib compatibility issues (excluding feature bug fixes)

  • DateTime

    • DateTime#to_time now preserves timezone. Bug #12189
  • Psych

    • Update Psych 2.2.2
  • RDoc

    • Update RDoc 5.0.0
  • RubyGems

    • Update RubyGems 2.6.8
  • Time

  • thread

    • the extension library is removed. Till 2.0 it was a pure ruby script "thread.rb", which has precedence over "thread.so", and has been provided in $LOADED_FEATURES since 2.1.
  • Zlib

Implementation improvements

  • In some condition, [x, y].max and [x, y].min are optimized so that a temporal array is not created. The concrete condition is an implementation detail: currently, the array literal must have no splat, must have at least one expression but literal, the length must be <= 0x100, and Array#max and min must not be redefined. It will work in most casual and real-life use case where it is written with intent to Math.max(x, y).

  • Thread deadlock detection now shows their backtrace and dependency. Feature #8214

  • st_table (st.c) internal data structure is improved. Feature #12142

  • Rational is extensively optimized. Feature #12484

@ianks

This comment has been minimized.

ianks commented Nov 15, 2016

Which of these should be implemented in ruby?

@headius

This comment has been minimized.

Member

headius commented Nov 15, 2016

@ianks Any that make sense! Obviously some things, like potential Hash optimizations, would have to be in Java, but many of these features would be just fine in Ruby. See https://github.com/jruby/jruby/tree/master/core/src/main/ruby/jruby/kernel.

headius added a commit that referenced this issue Nov 17, 2016

@headius

This comment has been minimized.

Member

headius commented Nov 17, 2016

Note that for [x, y].max, JRuby 9.1.5.0+ already allocates a smaller object to hold x, y. Remaining work would be enhancements to the IR builder to optimize this structure to just do the comparison.

@headius headius referenced this issue Jun 26, 2017

Open

Unimplemented Ruby 2.4 features #4687

4 of 17 tasks complete

headius added a commit that referenced this issue Jun 26, 2017

headius added a commit that referenced this issue Jun 26, 2017

headius added a commit that referenced this issue Jun 26, 2017

[2.4] Partially implement NameError#private_call? #4293
This is a partial impl since we do not have the actual original
call type available when the exception is created.

headius added a commit that referenced this issue Jun 26, 2017

headius added a commit that referenced this issue Jun 27, 2017

[2.4] Fixes for Numeric recursion guard logic in ec800e6.
* coerceBin should not recursion check
* RubyFixnum's old override of quo is deleted

For #4293.
@headius

This comment has been minimized.

Member

headius commented Aug 28, 2017

Unless there are late-breaking additions, I think this is what we're settling on for 2.4 support in the initial JRuby 9.2 release. We'll continue to track missing 2.4 features at #4687 and related issues.

@headius headius closed this Aug 28, 2017

headius added a commit that referenced this issue Oct 18, 2017

[2.4] Fixes for Numeric recursion guard logic in ec800e6.
* coerceBin should not recursion check
* RubyFixnum's old override of quo is deleted

For #4293.

headius added a commit that referenced this issue Oct 18, 2017

@headius headius referenced this issue Nov 29, 2017

Closed

Ruby 2.5 Support #4876

64 of 75 tasks complete

@headius headius referenced this issue Mar 27, 2018

Open

JRuby 9.2 Projects #5119

6 of 15 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment