J
Jeff Mitchell
module A
FOO = 99
end
module A
class B
puts "FOO is #{FOO}" # => "FOO is 99"
end
end
class A::B
puts "FOO is #{FOO}" # error
end
Comments? I assumed the two forms were equivalent until I ran into
this. Is there a reason they should be different? I prefer the
second form, if only to save some indentation space.
FOO = 99
end
module A
class B
puts "FOO is #{FOO}" # => "FOO is 99"
end
end
class A::B
puts "FOO is #{FOO}" # error
end
Comments? I assumed the two forms were equivalent until I ran into
this. Is there a reason they should be different? I prefer the
second form, if only to save some indentation space.