I am trying to obtain access to Object#try in ruby.
I thought that just including activesupport would do the trick, but it doesn't.
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'active_support'
=> true
irb(main):003:0> o = Object.new
=> #<Object:0x15d45d9>
irb(main):004:0> o.respond_to? :try
=> false
irb(main):005:0>
How do I get access to Object#try
?
try
isn't supposed to gobble upNoMethodError
s, it's meant to stop you from calling any method on aNilClass
. – Northeasterly