Skip to content

Ruby 2.6 : fix Struct#to_h exception message#6151

Merged
headius merged 1 commit intojruby:ruby-2.6from
k77ch7:ruby-2.6-fix-Struct_to_h_block
Mar 29, 2020
Merged

Ruby 2.6 : fix Struct#to_h exception message#6151
headius merged 1 commit intojruby:ruby-2.6from
k77ch7:ruby-2.6-fix-Struct_to_h_block

Conversation

@k77ch7
Copy link
Contributor

@k77ch7 k77ch7 commented Mar 29, 2020

This PR targets to make the following TravisCI test passed.

13)
Struct#to_h with block raises ArgumentError if block returns longer or shorter array ERROR
ArgumentError: wrong array length at 0 (expected 2, was 3)
org/jruby/RubyStruct.java:651:in `to_h'
/home/travis/build/jruby/jruby/spec/ruby/core/struct/to_h_spec.rb:27:in `block in <main>'
/home/travis/build/jruby/jruby/spec/ruby/core/struct/to_h_spec.rb:26:in `block in <main>'
org/jruby/RubyBasicObject.java:2687:in `instance_exec'
org/jruby/RubyArray.java:4557:in `all?'
org/jruby/RubyArray.java:1817:in `each'
org/jruby/RubyArray.java:1817:in `each'
/home/travis/build/jruby/jruby/spec/ruby/core/struct/to_h_spec.rb:4:in `<main>'
org/jruby/RubyKernel.java:1051:in `load'
org/jruby/RubyBasicObject.java:2687:in `instance_exec'
org/jruby/RubyArray.java:1817:in `each'

@headius
Copy link
Member

headius commented Mar 29, 2020

Thank you!

@headius headius added this to the JRuby 9.3.0.0 milestone Mar 29, 2020
@headius headius merged commit 329b45c into jruby:ruby-2.6 Mar 29, 2020
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.

2 participants