when nreturns is 0 and nparams is 1 or more I get this output:
[output]
nreturns = 1, nparams = 0, templated = true
has_returns.class = TrueClass, has_params.class = FalseClass, templated2.class = Fixnum
has_returns = true, has_params = false, templated2 = 1
[/output]
Both 'templated2' and 'templated' should be true, not 0. I can't seem to duplicate this in irb. Even in the debugger,
"p nreturns > 0 or nparams > 0" gives true, while "p templated" gives false.
This must be a bug in the interpreter is my guess? My ruby version is 1.8.4 win32.
when nreturns is 0 and nparams is 1 or more I get this output:
[output]
nreturns = 1, nparams = 0, templated = true
has_returns.class = TrueClass, has_params.class = FalseClass, templated2.class = Fixnum
has_returns = true, has_params = false, templated2 = 1
[/output]
Both 'templated2' and 'templated' should be true, not 0. I can't seem to duplicate this in irb. Even in the debugger,
"p nreturns > 0 or nparams > 0" gives true, while "p templated" gives false.
This must be a bug in the interpreter is my guess? My ruby version is 1.8.4 win32.
Thanks,
~S
I can get templated to the correct value by doing this:
[code]
templated = false
if nreturns > 0 or nparams > 0
templated = true
end
[/code]