J
John Maclean
Hi Guys,
Simple script that spits out "Ruby" if it was typed at stdin. What's the error, see below.
#!/usr/bin/env ruby
while gets
if /Ruby/
print
end
end
jayeola@tp20$ ruby fx/ruby/p22
fx/ruby/p22:4: warning: regex literal in condition
haha
Ruby
Ruby
Simple script that spits out "Ruby" if it was typed at stdin. What's the error, see below.
#!/usr/bin/env ruby
while gets
if /Ruby/
end
end
jayeola@tp20$ ruby fx/ruby/p22
fx/ruby/p22:4: warning: regex literal in condition
haha
Ruby
Ruby