Environment Information
- JRuby 10.0.5.0
- OS: MacOS (arm)
Expected Behavior
Same as with CRuby:
irb(main):001> RUBY_VERSION
=> "4.0.1"
irb(main):002> Object.new.instance_exec([1]) { |x = :unset| x }
=> [1]
irb(main):003> Object.new.instance_exec([1]) { |x| x }
=> [1]
Actual Behavior
irb(main):001> Object.new.instance_exec([1]) { |x = :unset| x }
=> 1
irb(main):002> Object.new.instance_exec([1]) { |x| x }
=> [1]
When there is and array and a default value, only params first value is returned. It also happens for the array with more than one element:
irb(main):003> Object.new.instance_exec([1, 2]) { |x = :unset| x }
=> 1
I looks similar to #9208
Environment Information
Expected Behavior
Same as with CRuby:
Actual Behavior
When there is and array and a default value, only params first value is returned. It also happens for the array with more than one element:
I looks similar to #9208