$echo "我们都喜欢用 Ruby" | rmmseg
/Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:24:in next_token': undefined methodlength' for #<Enumerator: "我们都喜欢用 Ruby\n":each_char> (NoMethodError)
from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:44:in segment' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg.rb:12:insegment'
from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/bin/rmmseg:65:in <top (required)>' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/bin/rmmseg:23:inload'
from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/bin/rmmseg:23:in `'
Here is what the error looks like:
$echo "我们都喜欢用 Ruby" | rmmseg /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:24:in'
next_token': undefined method
length' for #<Enumerator: "我们都喜欢用 Ruby\n":each_char> (NoMethodError) from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg/algorithm.rb:44:insegment' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/lib/rmmseg.rb:12:in
segment' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/gems/rmmseg-0.1.6/bin/rmmseg:65:in<top (required)>' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/bin/rmmseg:23:in
load' from /Users/webmagnets/.rvm/gems/ruby-1.9.3-p327@blt/bin/rmmseg:23:in `