Rio/CVS tells me: undefined method '>'

O

Oliver Cromm

Rio with CVS didn't work as expected on my data, so I tried the examples
given at <http://rio.rubyforge.org/classes/RIO/Doc/INTRO.html>

I ran into the same problem. What's wrong? Does this work for anybody
else?

| $ irb
| irb(main):001:0> require 'rio'
| => true
| irb(main):002:0> rio('f.csv').puts!(["h0,h1","f0,f1"])
| => #<Rio:0x3ff2d5ac:"path:f.csv" (Stream::Reset)>
| irb(main):003:0> rio('f.csv').csv.records[]
| => [["h0", "h1"], ["f0", "f1"]]
| irb(main):004:0> rio('f.csv').csv[0] > rio('out').csv
| NoMethodError: undefined method `>' for [["h0", "h1"]]:Array
| from (irb):4

The following works correctly, though:

rio('f.csv').csv > rio('out').csv

Updating rio didn't help me. I'm at ruby 1.8.6 and rio 0.4.1 on cygwin.
I'll try to repeat on my FreeBSD server ... actually got around to
fixing the broken Ruby there and got the same response for rio, so it's
not a cygwin thing.
 

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

No members online now.

Forum statistics

Threads
473,967
Messages
2,570,148
Members
46,694
Latest member
LetaCadwal

Latest Threads

Top