lib/safemode/jail.rb in safemode-1.2.0 vs lib/safemode/jail.rb in safemode-1.2.1
- old
+ new
@@ -22,7 +22,16 @@
# don't need to jail objects returned from a jail. Doing so would provide
# "double" protection, but it also would break using a return value in an if
# statement, passing them to a Rails helper etc.
@source.send(method, *args, &block)
end
+
+ # needed for compatibility with 1.8.7; remove this method once 1.8.7 support has been dropped
+ def respond_to?(method, *)
+ respond_to_missing?(method)
+ end
+
+ def respond_to_missing?(method_name, include_private = false)
+ self.class.allowed?(method_name)
+ end
end
end
\ No newline at end of file