Skip to content

Ruby 2.6 : Add :receiver option to NameError.new and NomethodError.new#6666

Merged
headius merged 2 commits intojruby:masterfrom
k77ch7:ruby-2.6-add-receiver-option
May 10, 2021
Merged

Ruby 2.6 : Add :receiver option to NameError.new and NomethodError.new#6666
headius merged 2 commits intojruby:masterfrom
k77ch7:ruby-2.6-add-receiver-option

Conversation

@k77ch7
Copy link
Contributor

@k77ch7 k77ch7 commented May 9, 2021

This PR adds :receiver option to to NameError.new and NomethodError.new.

Copy link
Member

@kares kares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 we could eliminate the Hash allocation from initialize
(but it's less important than shipping the receiver feature)

@kares kares added this to the JRuby 9.3.0.0 milestone May 9, 2021
@k77ch7
Copy link
Contributor Author

k77ch7 commented May 9, 2021

@kares Thanks for your review. I updated the commit.

@headius
Copy link
Member

headius commented May 10, 2021

This failed but I can't see how it would be related to your change:

IO#read raises IOError when stream is closed by another thread FAILED
Expected #<Java::JavaLang::NullPointerException: > (Java::JavaLang::NullPointerException)
to be kind of IOError
/home/travis/build/jruby/jruby/spec/ruby/core/io/read_spec.rb:322:in `block in <main>'
org/jruby/RubyBasicObject.java:2668:in `instance_exec'
org/jruby/RubyArray.java:4648:in `all?'
org/jruby/RubyArray.java:1852:in `each'
/home/travis/build/jruby/jruby/spec/ruby/core/io/read_spec.rb:178:in `<main>'
org/jruby/RubyKernel.java:1049:in `load'
org/jruby/RubyBasicObject.java:2668:in `instance_exec'
org/jruby/RubyArray.java:1852:in `each'

Seems to be an intermittent failure. I will file an issue for it and restart that job.

@headius headius merged commit fc590aa into jruby:master May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants