Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Enumerable
- def _(method, *args, &block)
- respond_to?(method) ? send(method, *args, &block) : first.send(method, *args, &block)
- end
- end
- puts ['ok', 'asdf']._(:gsub, 'ok', 'good') # => 'good
Add Comment
Please, Sign In to add comment