I also have a use case where I use `--disable-gems` for performance. I maintain a tool that provides some shell hooks in ruby, and any slow down in getting to a prompt is incredibly noticeable.lugray (Lisa Ugray)
I was pointed here after sharing the following code with my team mates. I really like the idea, and find I often reach for it. I second the name `only`. ``` ruby module Enumerable def only only! rescue IndexError nil ...lugray (Lisa Ugray)
If that's covered (and I agree it should be) it's also worth showing a case where they are not optional: ``` def baz yield [1, 2], 3 end baz { |a, b, c| p a: a, b: b, c: c } #=> {:a=>[1, 2], :b=>3, :c=>nil} baz { |(a, b), c|...lugray (Lisa Ugray)
When an `OpenStruct` has some attribute `foo`, calling the `foo` method with an argument gives a no method error: ```ruby foo = OpenStruct.new(bar: 'baz') foo.bar(0) # => NoMethodError (undefined method `bar' for #<OpenStruct bar="baz...lugray (Lisa Ugray)