Permalink
Browse files

Add respond_to? second argument true for protected method

respond_to? against a protected method now returns false unless
the second argument is true.
https://github.com/ruby/ruby/blob/trunk/NEWS
  • Loading branch information...
1 parent 40ae575 commit aee198f457b97cb24bf1e3095fed2dcbf563029e @sanemat committed Dec 21, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 test/unit/machine_test.rb
View
@@ -656,11 +656,11 @@ def test_should_define_an_event_attribute_writer
end
def test_should_define_an_event_transition_attribute_reader
- assert @object.respond_to?(:state_event_transition)
+ assert @object.respond_to?(:state_event_transition, true)
end
def test_should_define_an_event_transition_attribute_writer
- assert @object.respond_to?(:state_event_transition=)
+ assert @object.respond_to?(:state_event_transition=, true)
end
def test_should_not_define_action
@@ -692,11 +692,11 @@ def test_should_define_an_event_attribute_writer
end
def test_should_define_an_event_transition_attribute_reader
- assert @object.respond_to?(:state_event_transition)
+ assert @object.respond_to?(:state_event_transition, true)
end
def test_should_define_an_event_transition_attribute_writer
- assert @object.respond_to?(:state_event_transition=)
+ assert @object.respond_to?(:state_event_transition=, true)
end
def test_should_not_define_action
@@ -732,11 +732,11 @@ def test_should_define_an_event_attribute_writer
end
def test_should_define_an_event_transition_attribute_reader
- assert @object.respond_to?(:state_event_transition)
+ assert @object.respond_to?(:state_event_transition, true)
end
def test_should_define_an_event_transition_attribute_writer
- assert @object.respond_to?(:state_event_transition=)
+ assert @object.respond_to?(:state_event_transition=, true)
end
def test_should_define_action
@@ -773,11 +773,11 @@ def test_should_define_an_event_attribute_writer
end
def test_should_define_an_event_transition_attribute_reader
- assert @object.respond_to?(:state_event_transition)
+ assert @object.respond_to?(:state_event_transition, true)
end
def test_should_define_an_event_transition_attribute_writer
- assert @object.respond_to?(:state_event_transition=)
+ assert @object.respond_to?(:state_event_transition=, true)
end
def test_should_define_action
@@ -815,11 +815,11 @@ def test_should_define_an_event_attribute_writer
end
def test_should_define_an_event_transition_attribute_reader
- assert @object.respond_to?(:state_event_transition)
+ assert @object.respond_to?(:state_event_transition, true)
end
def test_should_define_an_event_transition_attribute_writer
- assert @object.respond_to?(:state_event_transition=)
+ assert @object.respond_to?(:state_event_transition=, true)
end
def test_should_define_action

0 comments on commit aee198f

Please sign in to comment.