From: stoodfarback@... Date: 2015-12-28T22:49:33+00:00 Subject: [ruby-core:72574] [Ruby trunk - Bug #10687] ArgumentError in certain cases of instance_exec (new bug in 2.2) Issue #10687 has been updated by stood far back. Still broken at 2.3.0: ~~~ $ ruby -v a.rb ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux] a.rb:1:in `block in
': wrong number of arguments (given 4, expected 0..1) (ArgumentError) from a.rb:4:in `instance_exec' from a.rb:4:in `
' ~~~ ---------------------------------------- Bug #10687: ArgumentError in certain cases of instance_exec (new bug in 2.2) https://bugs.ruby-lang.org/issues/10687#change-55828 * Author: Anonymous * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux] * Backport: ---------------------------------------- a.rb: ~~~ foo = ->(a = nil) do p(a) end instance_exec(["a", "b", "c", "d"], &foo) ~~~ ~~~ #=> rvm use 2.1 && ruby -v && ruby a.rb Using /home/micaeked/.rvm/gems/ruby-2.1.5 ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux] ["a", "b", "c", "d"] #=> rvm use 2.2 && ruby -v && ruby a.rb Using /home/micaeked/.rvm/gems/ruby-2.2.0 ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux] a.rb:1:in `block in
': wrong number of arguments (4 for 0..1) (ArgumentError) from a.rb:5:in `instance_exec' from a.rb:5:in `
' ~~~ ---Files-------------------------------- relaxed.patch (654 Bytes) test_lambda_relaxed.rb (10.6 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: