- respond_to_missing? is now a required method
This commit is contained in:
DBA
2010-08-23 01:29:59 +08:00
committed by Tobias Lütke
parent 5425679a96
commit 8e4573a7bf
2 changed files with 8 additions and 0 deletions
+5
View File
@@ -18,4 +18,9 @@ class StrainerTest < Test::Unit::TestCase
assert_equal true, strainer.respond_to?('size', false)
end
# Asserts that Object#respond_to_missing? is not being undefined in Ruby versions where it has been implemented
# Currently this method is only present in Ruby v1.9.2, or higher
def test_object_respond_to_missing
assert_equal Object.respond_to?(:respond_to_missing?), Strainer.create(nil).respond_to?(:respond_to_missing?)
end
end