From: "Sandor Szücs" Date: 2009-01-27T20:26:58+09:00 Subject: Re: Remotely passing value on system() or %x[] On 27.01.2009, at 09:32, Naresh Ramaswamy wrote: > rubee.rb:25: private method `chomp' called for ["basetest\n"]:Array > (NoMethodError) As Brian already pointed it's String#chomp not Array#chomp. String#lines gives you an Enumerable::Enumerator. Your range index will give you an Array: $filename = rio('some.txt').lines[0..0] #=> ["basetest\n"] If you just want "basetest\n" then use: $filename = rio('some.txt').lines[0] #=> "basetest\n" or $filename = rio('some.txt').lines.first #=> "basetest\n" > :( Cmon, you will get it, if you read the error message carefully. Try your code in irb and then ask your objects with inspect() or class() what they really are, maybe you have not the object you thought. Regards, Sandor Szücs --