respond_to? caches/returns incorrect result
-------------------------------------------
Key: JRUBY-4954
URL: http://jira.codehaus.org/browse/JRUBY-4954
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.5.1
Reporter: Nick Sieger
Assignee: Nick Sieger
Fix For: JRuby 1.6
RespondToCallsite doesn't include visibility check in the cache tuple, thus
multiple calls through the call site with different values turn up incorrect
results.
This bug surfaced in Rails' ActiveRecord tests:
{noformat}
# test/cases/relations_test.rb
class RelationTest < ActiveRecord::TestCase
# ...
def test_respond_to_private_arel_methods
relation = Topic.scoped
assert ! relation.respond_to?(:matching_attributes)
assert relation.respond_to?(:matching_attributes, true)
end
end
{noformat}
Fix coming.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email