Ruby Float out of range warning?

K

Kathy Lee

I'm new to Ruby and I've been playing around with it abit.

the following line of code produces a out of range warning.
puts 3.14159 #outputting a simple float value

It will output the value in console, however it will warn me with the
following:
C:/Users/Admin/IdeaProjects/RubyExampl… warning: Float 3.14159 out of
range

To my knowledge, the value should be within bounds of a float object.
I'm using Ruby SDK v1.8.6 and IntelliJ with the Ruby plugin as my IDE

Thanks, any help is appreciated.
 
P

Phillip Gawlowski

It will output the value in console, however it will warn me with the
following:
C:/Users/Admin/IdeaProjects/RubyExampl… warning: Float 3.14159 out of
range

irb(main):001:0> puts 3.14159
3.14159
=> nil
irb(main):002:0> RUBY_VERSION
=> "1.8.6"
To my knowledge, the value should be within bounds of a float object.
I'm using Ruby SDK v1.8.6 and IntelliJ with the Ruby plugin as my IDE

What is "Ruby SDK"?
 
P

Phillip Gawlowski

It's the Ruby interpreter, i.e Ruby.exe

Then, apparently, your IDE is throwing the error.

BTW, we refer to Ruby as "Ruby RUBY_VERSION", not as "Ruby SDK". :)
 
K

Kathy Lee

Phillip said:
Then, apparently, your IDE is throwing the error.

BTW, we refer to Ruby as "Ruby RUBY_VERSION", not as "Ruby SDK". :)

Oh thanks, appreciate it. Would you please recommend a decent IDE in
that case?
 
P

Phillip Gawlowski

Oh thanks, appreciate it. Would you please recommend a decent IDE in
that case?

Well, *that* opens a whole can of worms. ;)

Me, I use NetBeans if I have to have access to IDE features.
Otherwise, I'm happy with vim (if you are on Windows, I can point you to
an article I wrote in getting vim 7.2 to work with Ruby from within
vim), or Notepad++, simple text editors.

All of these choices are Free as in beer, as well as in speech.
 
M

Marnen Laibow-Koser

Kathy said:
Oh thanks, appreciate it. Would you please recommend a decent IDE in
that case?

Try working without an IDE. Ruby doesn't benefit from IDEs nearly as
much as Java does. I recommend a good editor such as jEdit or
KomodoEdit instead. NetBeans *mostly* has good Ruby support, if you
really need an IDE.


Best,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,001
Messages
2,570,251
Members
46,850
Latest member
Brightrs

Latest Threads

Top