String#% is not working on Ruby 1.8.7

  • Thread starter Vikrant Chaudhary
  • Start date
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

To reproduce, I just copied the example right from ruby-doc
http://www.ruby-doc.org/core/classes/String.html#M001127 into irb
session.
ArgumentError: malformed format string - %{
from (irb):1:in `%'
from (irb):1

I'm using
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
on Ubuntu amd64
They changed the default Ruby on ruby-doc to 1.9.2, docs for 1.8.7 are at
http://www.ruby-doc.org/core-1.8.7/classes/String.html#M000742
 
J

James Britt

M

Markus Fischer

I've been hit by this a few times too. Usually I land in the middle of a
page through Google, and thus I always miss the "head" of the page when
I quickly want to look up things.

Would be nice if, when new features are introduced, they also get
document. In this case, .e.g.

str % arg - since Ruby 1.x.y
Support for hashes - since Ruby 1.9.2
...

- Markus
 
J

Josh Cheek

[Note: parts of this message were removed to make it a legal post.]

I've been hit by this a few times too. Usually I land in the middle of a
page through Google, and thus I always miss the "head" of the page when
I quickly want to look up things.

Would be nice if, when new features are introduced, they also get
document. In this case, .e.g.

str % arg - since Ruby 1.x.y
Support for hashes - since Ruby 1.9.2
...
I always go the other way, since Google always found 1.8.6 docs, I only knew
1.8.6 API, and I would see people use useful / cool methods that I didn't
even know about :p I'm happy about this decision :)
 

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,254
Members
46,851
Latest member
CliftonCor

Latest Threads

Top