If i put :
(..)
end
puts buffer.inspect
Regexp.union(buffer.uniq)
end
puts negative_terms_regexp("term, term2, termx").inspect
I get locally:
ruby test.rb
[/term/, /term2/, /termx/]
/(?-mix:term)|(?-mix:term2)|(?-mix:termx)/
Production:
ruby test.rb
[/term/, /term2/, /termx/]
test.rb:38:in `union': can't convert Array into String (TypeError)
from test.rb:38:in `negative_terms_regexp'
This may be ruby bug?
--
Posted via http://www.ruby-forum.com/.