Forum: RSpec jruby require 'jcode' problem and cucumber 1.2.0

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
08fbedeb4ba773a4861c2537ee5c95d6?d=identicon&s=25 Steve Molitor (Guest)
on 2009-04-26 04:22
(Received via mailing list)
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:in `succ!'
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:in
`each'
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:in
`collect'
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:in
`load'
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
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-26 12:50
(Received via mailing list)
> 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
This topic is locked and can not be replied to.