Ruby Rendezvous: Method Call, Proc, and Beyond
summary
Survey of concrete Ruby tricks: shows how parser rules in parse.y cause multi-line string concatenation in Ruby 3.2, inspects 14 ways to invoke methods (Greg’s 12 plus two found here), demonstrates :: used as a call operator vs dot, explains triple-equals proc dispatch (available since 1.9.1) and using proc.=== in case, unpacks Hash#to_proc implementation that produces [k,v] pairs for map, and demos currying with double-bracket invocation and using method objects (e.g. 2.method(:+).to_proc) to supply a fixed first argument.
AI-written summary · about
chapters (15)
- 0:00Introduction and welcome
- 1:06Finding the right title
- 3:15Talk overview and nostalgia
- 5:49Ruby string concatenation quirks
- 9:13Method calling in Ruby
- 10:58Double colon operator
- 14:36Calling a proc
- 19:36Triple equals for procs
- 21:49Methods with arguments
- 25:06Currying procs
- 26:32Map with ampersand
- 30:37Hash with map
- 32:32Iterator variable tricks
- 33:15Summary and examples
- 34:00Q&A
