Skip to content

Instantly share code, notes, and snippets.

@yancya
Last active March 31, 2017 14:51
Show Gist options
  • Save yancya/3b5b27690429467bde47322c3b0d0e27 to your computer and use it in GitHub Desktop.
Save yancya/3b5b27690429467bde47322c3b0d0e27 to your computer and use it in GitHub Desktop.
2.4.1 からエラー出るようになったやつ
proc = -> (_, o) { p o }
[1,2].tap { |_, o| p o } #=> 2
[1,2].tap(&proc) #=> wrong number of arguments (given 1, expected 2) (ArgumentError)
@yancya
Copy link
Author

yancya commented Mar 31, 2017

なるほどー

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment