Range#eql? works incorrectly for char ranges
--------------------------------------------
Key: JRUBY-1596
URL: http://jira.codehaus.org/browse/JRUBY-1596
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x
Environment: Ubuntu Linux 7.10,
ruby 1.8.5 (2007-11-21 rev 4842) [i386-jruby1.1b1]
Reporter: Vladimir Sizikov
Attachments: range.diff
MRI:
("G".."M").eql?("G".."M") ==> true
JRuby:
("G".."M").eql?("G".."M") ==> false
This causes Rubinius spec test to fail:
#> bin/mspec -t jruby spec/core/range
3)
Range#eql? returns true if other has same begin, end, and exclude_end? values
FAILED
Expected false to equal true:
/opt/work/rubinius/spec/mini_rspec.rb:217:in `=='
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:5:in `=='
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:3:in `it'
/opt/work/rubinius/spec/mini_rspec.rb:355:in `it'
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:3:in `it'
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:3:in `describe'
/opt/work/rubinius/spec/mini_rspec.rb:399:in `describe'
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:2:in `describe'
/opt/work/rubinius/./spec/core/range/shared/equal_value.rb:2:in `call'
/opt/work/rubinius/./spec/core/range/../../spec_helper.rb:154:in
`it_behaves_like'
/opt/work/rubinius/./spec/core/range/eql_spec.rb:5:in `it_behaves_like'
/opt/work/rubinius/./spec/core/range/eql_spec.rb:4:in `describe'
/opt/work/rubinius/spec/mini_rspec.rb:399:in `describe'
/opt/work/rubinius/./spec/core/range/eql_spec.rb:4:in `describe'
/opt/work/rubinius/./spec/core/range/eql_spec.rb:4:in `load'
last_mspec.rb:11:in `load'
last_mspec.rb:1:in `each'
last_mspec.rb:6:in `each'
The submitted patch fixes the problem.
--
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