Hi, I want to introduce a way to pipeline method calls in Ruby. I imagined that the Ruby-styled pipelined calls should be like: ```ruby 1.pipe do call 1 + _ # => after this line, _ becomes 2 call _ * 3 # => after this line,...cichol (Renxiang Cai)
The String#split documentation(http://ruby-doc.org/core-2.4.1/String.html#method-i-split) described: > If pattern is a Regexp, str is divided where the pattern matches. Whenever the pattern matches a zero-length string, str is split i...cichol (Renxiang Cai)
~~~ module M end class Hash prepend M end class Hash def [](k) p 3 end def map p 4 end end h = {a: 1} h[:a] #=> return 1 and without print 3 h.send(:[], :a) #=> print 3 h.map # => print 4 ~~~ ...cichol (Renxiang Cai)
~~~ module M def self.prepended(clz) clz.class_eval do def [](k) p 1 end end end end module N def self.included(clz) clz.class_eval do def []=(k, v) p 2 end ...cichol (Renxiang Cai)