Last active
March 31, 2017 14:51
-
-
Save yancya/3b5b27690429467bde47322c3b0d0e27 to your computer and use it in GitHub Desktop.
2.4.1 からエラー出るようになったやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proc = -> (_, o) { p o } | |
[1,2].tap { |_, o| p o } #=> 2 | |
[1,2].tap(&proc) #=> wrong number of arguments (given 1, expected 2) (ArgumentError) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2.1まではエラーだったのが2.2からエラー出ないようになってたと思います。
https://bugs.ruby-lang.org/issues/9605#note-12