From: Ashita Hara Date: 2010-02-18T09:38:47+09:00 Subject: rubyful_soup.rb - error and warning message Hello Group, version: ruby 1.9.1p378 source: $ cat kitty.rb #!/usr/bin/ruby -w require 'rubyful_soup' When I run the source code, it gave me the following error: $ ./kitty.rb /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:238: warning: mismatched indentations at 'end' with 'if' at 233 ./kitty.rb:3:in `require': /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:233: syntax error, unexpected ':', expecting keyword_then or ';' or '\n' (SyntaxError) /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:426: syntax error, unexpected keyword_end, expecting $end from ./kitty.rb:3:in `
' 232: @attrs = @attr_list.inject({}) do |m,v| 233: if v[1][0] == ?" and v[1][-1] == ?": 234: v[1] = v[1][1..-2] 235: end 236: m[v[0]] = v[1] 237: m 238: end I removed the extra colon at the end of line 233 then I get a warning message: $ ./kitty.rb /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:18: warning: variable $KCODE is no longer effective; ignored /usr/local/ruby/lib/ruby/gems/1.9.1/gems/rubyful_soup-1.0.4/lib/rubyful_soup.rb:230: warning: method redefined; discarding old attrs I heard that we need to use --charset option to fix this problem however, I did not find this option in ruby -h or man ruby. Any guidance will be greatly appreciated. Regards, Ashita -- Posted via http://www.ruby-forum.com/.