J
James O'Brien
[Note: parts of this message were removed to make it a legal post.]
File.open('myfile') do |f|
puts f.basename;
end
myfile exists on the filesystem but this code blows up with
undefined method `basename'
could someone explain why (given the docs
http://ruby-doc.org/core/classes/File.html
advertise the basename method)
[ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]]
Thanks!
File.open('myfile') do |f|
puts f.basename;
end
myfile exists on the filesystem but this code blows up with
undefined method `basename'
could someone explain why (given the docs
http://ruby-doc.org/core/classes/File.html
advertise the basename method)
[ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]]
Thanks!