Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8477179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:23:20+00:00 2026-06-10T18:23:20+00:00

Sometimes I see code using to_d . The ruby documentation even states there is

  • 0

Sometimes I see code using to_d. The ruby documentation even states there is a Float#to_d method. However, it’s not in my version of ruby (ruby 1.9.3p263 (2012-08-23 revision 36792).

1.9.3p263 :001 > "0.0".to_d
NoMethodError: undefined method `to_d' for "0.0":String
    from (irb):1
    from /home/iblue/.rvm/rubies/ruby-1.9.3-head/bin/irb:16:in `<main>'
1.9.3p263 :002 > 0.0.to_d
NoMethodError: undefined method `to_d' for 0.0:Float
    from (irb):2
    from /home/iblue/.rvm/rubies/ruby-1.9.3-head/bin/irb:16:in `<main>'
1.9.3p263 :003 > 0.to_d
NoMethodError: undefined method `to_d' for 0:Fixnum
    from (irb):3
    from /home/iblue/.rvm/rubies/ruby-1.9.3-head/bin/irb:16:in `<main>'

No to_d in Float, String or Fixnum. What’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T18:23:22+00:00Added an answer on June 10, 2026 at 6:23 pm

    As stated in the example of the documentation you need

    require 'bigdecimal'
    require 'bigdecimal/util'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes I see code like let (alt : recognizer -> recognizer -> recognizer) =
Sometimes when I see my logging code I wonder if I am doing it
Sometimes when looking at optimised code, I see that parameters that are used only
When I read django code sometimes, I see in some templates load url from
sometimes i see an image not being served when the browser look at www.somesite.com/some_image.jpg
When I run a build, sometimes I see a code change I forgot. So
Sometime when looking through code, I see many methods specify an annotation: @SuppressWarnings(unchecked) What
I sometimes see messages like Process 12990 waits for ExclusiveLock on tuple (889,66) of
While browsing SO I sometimes see EOFD for example: ftp -vn <$hostname> <<EOFD Yes
When creating iPhone apps in simulator, I sometimes see messages like Springboard failed to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.