Jruby require 'jcode' problem and cucumber 1.2.0


#1

After upgrading to cucumber 0.3.0 from 0.1.16 I’m getting this error
when I
try to run a feature:
/Users/steve/src/jruby-1.2.0/lib/ruby/1.8/jcode.rb:66:in end_regexp': too short multibyte code string: /[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf]$/ (RegexpError) from /Users/steve/src/jruby-1.2.0/lib/ruby/1.8/jcode.rb:79:insucc!’
from /Users/steve/src/jruby-1.2.0/lib/ruby/1.8/jcode.rb:94:in succ' from /Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:81:ineach’
from
/Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:81:in
to_a' from /Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:81 from /Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:80:incollect’
from
/Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:80
from
/Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:31:in
require' ... 27 levels... from /Users/steve/src/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/cucumber:6 from /Users/steve/src/jruby-1.2.0/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/cucumber:19:inload’
from /Users/steve/src/jruby-1.2.0/bin/cucumber:19

It’s this open Jruby issue:

http://jira.codehaus.org/browse/JRUBY-2964

Anyone have a workaround? I’m running jruby 1.2.0, java 1.5.0_16 on OS
X
leopard.

Thanks.

Steve


#2

from
/Users/steve/mercy/webpresence/vendor/gems/activeldap-1.0.2/lib/active_ldap/user_password.rb:31:in

http://jira.codehaus.org/browse/JRUBY-2964

Anyone have a workaround? I’m running jruby 1.2.0, java 1.5.0_16 on OS X
leopard.

Don’t require jcode and replace any occurrances of #jlength with #length
should work. Monkey patch if you have to.

Aslak