Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SortedSet#dup and SortedSet#to_a do not work as expected #4978

Closed
chuckremes opened this issue Jan 16, 2018 · 1 comment
Closed

SortedSet#dup and SortedSet#to_a do not work as expected #4978

chuckremes opened this issue Jan 16, 2018 · 1 comment
Assignees
Milestone

Comments

@chuckremes
Copy link

Environment

Provide at least:

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)

jruby 9.2.0.0-SNAPSHOT (2.4.1) 2018-01-05 2d48da9 Java HotSpot(TM) 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [darwin-x86_64]

  • Operating system and platform (e.g. uname -a)

Darwin Charless-Air 16.7.0 Darwin Kernel Version 16.7.0: Mon Nov 13 21:56:25 PST 2017; root:xnu-3789.72.11~1/RELEASE_X86_64 x86_64

Expected Behavior

  • Describe your expectation of how JRuby should behave, perhaps by showing how CRuby/MRI behaves.

MRI returns true for each attached test print.

JRuby returns false for the to_a test print.

  • Provide an executable Ruby script or a link to an example repository.
require 'set'

set1 = SortedSet[1, 2]

set2 = set1.dup

puts "expect different objects, [#{set1.object_id != set2.object_id}]"

puts "expect same contents, [#{set1 == set2}]"

puts "expect same length, [#{set1.size == set2.size}]"

puts "expect same to_a, [#{set1.to_a == set2.to_a}]"
@kares
Copy link
Member

kares commented Jan 16, 2018

good catch, likely related to the 'native' set.rb rewrite for 9.2 ... will look into this one.

@kares kares added this to the JRuby 9.2.0.0 milestone Jan 16, 2018
@kares kares self-assigned this Jan 16, 2018
@kares kares closed this as completed in 8723a89 Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants