I
Ib Lis
Hi
I'm new to Ruby. Coming from Perl I really do enjoy the syntax and...
irb.
When I load a file, classes are loaded but not the variables set in the
file.
My file ends like that :
fields = Set.new
bibfile.each do | entry |
entry.properties.keys.each do | field |
fields << field
end
end
p fields
After load, irb prints the value of fields but the variable is not in
scope :
#<Set: {:booktitle, :volume, ages, :issn, :note, s, :number,
:author, :custom, :year, :title, :journal}>
=> trueNameError: undefined local variable or method `fields' for main:Object
Thanks in advance for any hints
I'm new to Ruby. Coming from Perl I really do enjoy the syntax and...
irb.
When I load a file, classes are loaded but not the variables set in the
file.
My file ends like that :
fields = Set.new
bibfile.each do | entry |
entry.properties.keys.each do | field |
fields << field
end
end
p fields
After load, irb prints the value of fields but the variable is not in
scope :
#<Set: {:booktitle, :volume, ages, :issn, :note, s, :number,
:author, :custom, :year, :title, :journal}>
=> trueNameError: undefined local variable or method `fields' for main:Object
Thanks in advance for any hints