I
Intransition
I have the following extensions to Binding:
class Binding
# Returns line number of the binding.
def __LINE__
eval("__LINE__")
end
# Returns file name of the binding.
def __FILE__
eval("__FILE__")
end
end
The work fine in 1.8.7 (or lower when you define Binding#eval), but
fails in 1.9 where it returns "(eval)" instead of the file name and
nothing at all for the line number.
Any idea on how to fix? Should this be considered a 1.9 bug?
class Binding
# Returns line number of the binding.
def __LINE__
eval("__LINE__")
end
# Returns file name of the binding.
def __FILE__
eval("__FILE__")
end
end
The work fine in 1.8.7 (or lower when you define Binding#eval), but
fails in 1.9 where it returns "(eval)" instead of the file name and
nothing at all for the line number.
Any idea on how to fix? Should this be considered a 1.9 bug?