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

BigDecimal.new("5-6").to_i returns 0 on 9k where 1.7 and MRI returns 5 #3527

Closed
kml opened this Issue Dec 9, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@kml
Copy link

kml commented Dec 9, 2015

2.2.3p173
>> BigDecimal.new("5-6").to_i
=> 5

1.7.19
>> BigDecimal.new("5-6").to_i
=> 5

9.0.4.0
>> BigDecimal.new("5-6").to_i
=> 0
@kml

This comment has been minimized.

Copy link
Author

kml commented Dec 9, 2015

Probably same as #3504 #3242
If so please close.

@kares

This comment has been minimized.

Copy link
Member

kares commented Dec 9, 2015

not really, this one is probably a regression since: ae7c197 (should fail in 1.7.23 as well)

@kares kares closed this in 5ffa6cd Dec 10, 2015

@kares kares added this to the JRuby 9.0.5.0 milestone Dec 10, 2015

kares added a commit to kares/jruby that referenced this issue Dec 10, 2015

handle "junk" tail in BigDecimal parsing like MRI does (fixes jruby#3527
)

unintentionally regressed since: a4843e5
Conflicts:
	test/jruby/test_big_decimal.rb

kares added a commit to kares/jruby that referenced this issue Jan 2, 2016

Merge branch 'jruby-1_7' into master
* jruby-1_7: (46 commits)
  calculate module name before storing in parent's constant hierarchy (resolves jruby#2945)
  remove double imports in RubyModule
  remove (unnecessary) global variable in spec_helper
  Symbol#to_proc procs' #parameters always return [[:rest]].
  remove com.bounday:high-scale-lib dependency (extracted necessary classes from it)
  AtomicReferenceFieldUpdater forces us to have volatile fields
  use the (internal) backported NonBlockingHashMapLong class instead of high_scale's
  make Unsafe usage in NonBlockingHashMapLong (ported from high-scale lib) optional
  add (and re-arrange) AbstractEntry class - NonBlockingHashMapLong now compilable
  NonBlockingHashMapLong - add in required Counter class and comment out prints
  NonBlockingHashMapLong copy-pasted from org.cliffc.high_scale_lib package
  [build] remove the rake-plugin from release
  [build] use newer versions for jruby-rake-plugin [skip ci]
  handle "junk" tail in BigDecimal parsing like MRI does (fixes jruby#3527)
  Update FileStat to return nil for methods MRI does not implement (nor do we)
  no singleton_class in 1.8.7
  sorting by name is not reliable as classes are all anonymous - sort by object_id instead
  each_object(cls.singleton_class) should not walk special classes.
  Bump for next dev cycle
  Whoops forgot to change VERSION
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.