You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Want to see a cool trick? How about loading CORE methods automagically. It’s like Ruby’s #autoload for core extensions.
require 'facets/opesc'
class Object
# This will automatically load (most) core methods
# if they are not present when called.
def method_missing(methodname, *a, &b)
methodname = OpEsc.escape(methodname)
begin
require "facets/#{class}/#{methodname}"
__send__(methodname, *a, &b)
rescue LoadError
super
end
end
end