Run the attached Ruby file.
The line mentioned for ArgumentError is 14, but the mistake is in line 17.
Ruby 1.6.5, 1.6.7 and 1.7.2 tested.
Bye,
Kero.
±-- Kero ------------------------------ kero@chello.nl —+
Don’t split your mentality without thinking twice |
Proud like a God – Guano Apes |
±-- M38c ---------- http://httpd.chello.nl/k.vangelder —+
misnumber-report.rb (443 Bytes)
Kero van Gelder kero@a26074.upc-a.chello.nl wrote in message news:20020628200654.GA1647@chmeee…
I think ArgumentError will point to the beginning of a method call if
the error is w/in a method call. ie. you’d see similar behavior if
the code was something like
packages.set(
Package.new(“ruby-dev”, “lib”, “extra”),
Package.new(“ruby-tk”, “lib”, “extra”),
Package.new(“ruby-doc”, “man”, “extra”),
Package.new(“ruby”, “interpreter”)
)
In general the parser’s error messages could use some work, but by the
time you feel adventurous enough to look into it you’ve gotten used to
them
A friend of mine, Tom Clarke was working on fixing some of these – he
thought “NameError” in particular was a confusing message.
~ Patrick