5 class Movie_Info
  6         attr_accessor :runtime, :language, :sound, :color
  7         def to_str
 38                 puts
(runtime==nil?'nil':runtime)+'&&&'+(language==nil?'nil':language)+'&&&'+(color==nil?'nil':color)+'&&&'+(sound==nil?'nil':sound)
 39                 return str
 40         end
 41 end

the statement at line 38 causes some error.

./util.rb:38: syntax error, unexpected tSTRING_BEG, expecting kDO or '{'
or '(' (SyntaxError)
                puts
(runtime==nil?'nil':runtime)+'&&&'+(language==nil?'nil':language)+'&&&'+(color==nil?'nil':color)+'&&&'+(sound==nil?'nil':sound)
-- 
Posted via http://www.ruby-forum.com/.