]> git.cworth.org Git - sup/blobdiff - lib/sup/util.rb
respond_to? needs include_private argument
[sup] / lib / sup / util.rb
index ceaf0b8dabc8a83ea451005e9b27bc109823caf1..9909022ffa9b0b1c5796f4fbdff925087dec2519 100644 (file)
@@ -108,7 +108,9 @@ class Module
   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
@@ -527,7 +529,9 @@ class Recoverable
   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