lib/sup/util.rb in sup-0.5 vs lib/sup/util.rb in sup-0.6

- old
+ new

@@ -106,11 +106,13 @@ end def defer_all_other_method_calls_to obj class_eval %{ def method_missing meth, *a, &b; @#{obj}.send meth, *a, &b; end - def respond_to? meth; @#{obj}.respond_to?(meth); end + def respond_to?(m, include_private = false) + @#{obj}.respond_to?(m, include_private) + end } end end class Object @@ -525,10 +527,12 @@ def id; __pass :id; end def to_s; __pass :to_s; end def to_yaml x; __pass :to_yaml, x; end def is_a? c; @o.is_a? c; end - def respond_to? m; @o.respond_to? m end + def respond_to?(m, include_private=false) + @o.respond_to?(m, include_private) + end def __pass m, *a, &b begin @o.send(m, *a, &b) rescue Exception => e