Re: When {integer:0} <> 0 ???



Richard Fairbanks wrote:
if p(Y.z): 0 # I assume this is the culprit!
osax.say(Y.z) #=> silence
end

What are you trying to do here?

What you've written is equivalent to

if p(Y.z)
0
osax.say(Y.z)
end

You haven't defined a method called p, so you get the standard Kernel#p

"p x" is like "puts x.inspect" and returns nil, which is treated as
false, so the code inside the if is not executed.
--
Posted via http://www.ruby-forum.com/.

.