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#to_r is not supported #1521

Closed
deepj opened this Issue Dec 8, 2018 · 2 comments

Comments

2 participants
@deepj
Copy link

deepj commented Dec 8, 2018

I'm quite surprised by this since BigDecimal#to_r is available in Ruby for ages

To reproduce:

require 'bigdecimal'

BigDecimal('1.5').to_r

Error:

NoMethodError: undefined method `to_r' for 0.15e1:BigDecimal
Did you mean?  to_i
               to_f
               to_c
               to_s
	from (irb):2
	from ~/.rubies/truffleruby-1.0.0-rc10/bin/irb:29:in `<main>'

@nirvdrum nirvdrum self-assigned this Jan 23, 2019

@nirvdrum

This comment has been minimized.

Copy link
Member

nirvdrum commented Jan 25, 2019

I've added support for BigDecimal#to_r in e3a61d5. This should be available in the TruffleRuby 1.0.0 RC 12 release. NB: there are other BigDecimal methods not yet implemented. I'll work through the list of them, but I wanted to get a fix out for your immediate problem.

@nirvdrum nirvdrum closed this Jan 25, 2019

@nirvdrum nirvdrum added this to the 1.0.0-rc12 milestone Jan 25, 2019

@nirvdrum

This comment has been minimized.

Copy link
Member

nirvdrum commented Feb 5, 2019

@deepj TruffleRuby 1.0.0 RC 12 is now available with this method added. Please give the release a try and let me know if you run into problems with the method. Thanks again for filing an issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment