Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ruby 2.6 suport for 5-2-stable branch #34720
Ruby 2.6.0-rc2 Released and Ruby 2.6 will be released on this December 25. I expect Rails 5.2 should run with Ruby 2.6 without errors/warnings.
This pull request backports changes to 5-2-stable branch to suppress errors and warnings which have been already addressed in the master branch. I'm wondering if these kinds of backporting should be done by Rails committers and/or release manager. Let me open a pull request first.
There are some errors remained. One can be "fixed" but it needs to backport pull requests with CHANGELOG. Another one, I do not know why it fails with 5-2-stable.
$ cd activesupport $ bundle exec ruby -w -Itest test/core_ext/range_ext_test.rb -n /test_should_compare/ Run options: -n /test_should_compare/ --seed 24989 # Running: F Failure: RangeTest#test_should_compare_other_with_exclusive_end [test/core_ext/range_ext_test.rb:72]: Expected false to be truthy. bin/rails test test/core_ext/range_ext_test.rb:71 F Failure: RangeTest#test_should_compare_identical_exclusive [test/core_ext/range_ext_test.rb:68]: Expected false to be truthy. bin/rails test test/core_ext/range_ext_test.rb:67 F Failure: RangeTest#test_should_compare_identical_inclusive [test/core_ext/range_ext_test.rb:64]: Expected false to be truthy. bin/rails test test/core_ext/range_ext_test.rb:63 Finished in 0.001701s, 1763.5357 runs/s, 1763.5357 assertions/s. 3 runs, 3 assertions, 3 failures, 0 errors, 0 skips
$ cd railties $ bundle exec ruby -w -Itest test/application/server_test.rb -n test_restart_rails_server_with_custom_pid_file_path Run options: -n test_restart_rails_server_with_custom_pid_file_path --seed 41272 # Running: F Failure: ApplicationTests::ServerTest#test_restart_rails_server_with_custom_pid_file_path [test/application/server_test.rb:53]: "Inherited" expected, but got: ... Traceback (most recent call last): 2: from bin/rails:4:in `<main>' 1: from /home/yahonda/.rbenv/versions/2.6.0-rc2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' /home/yahonda/.rbenv/versions/2.6.0-rc2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/commands (LoadError) . Expected "...\r\n\e[1mTraceback\e[m (most recent call last):\r\n\t2: from bin/rails:4:in `<main>'\r\n\t1: from /home/yahonda/.rbenv/versions/2.6.0-rc2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'\r\n/home/yahonda/.rbenv/versions/2.6.0-rc2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': \e[1mcannot load such file -- rails/commands (\e[1;4mLoadError\e[m\e[1m)\e[m\r\n" to include "Inherited". bin/rails test test/application/server_test.rb:35 Finished in 14.595938s, 0.0685 runs/s, 0.4111 assertions/s. 1 runs, 6 assertions, 1 failures, 0 errors, 0 skips
Regexp#match? is supported https://github.com/rails/rails/blob/5-2-stable/activesupport/lib/active_support/core_ext/regexp.rb#L8 but String#match? isn't
I don't see a reason why #32695 should be backported. It's a performance optimization and warnings are from rubocop. It's not related to Ruby 2.6 compatibility at all.