New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isutf8 exception Jruby 9.0.00 #3261

Closed
ggongaware opened this Issue Aug 18, 2015 · 10 comments

Comments

Projects
None yet
4 participants
@ggongaware

"text".isutf8
TypeError: no implicit conversion of Fixnum into String
from org/jruby/RubyString.java:5300:in force_encoding' from /xxx/.rvm/rubies/jruby-9.0.0.0/lib/ruby/stdlib/kconv.rb:193:inisutf8'
from /xxx/.rvm/rubies/jruby-9.0.0.0/lib/ruby/stdlib/kconv.rb:281:in isutf8' from (irb):7:in'
from org/jruby/RubyKernel.java:979:in eval' from org/jruby/RubyKernel.java:1292:inloop'
from org/jruby/RubyKernel.java:1099:in catch' from org/jruby/RubyKernel.java:1099:incatch'
from /xxx/.rvm/rubies/jruby-9.0.0.0/bin/irb:13:in `'

@rtyler

This comment has been minimized.

Show comment
Hide comment
@rtyler

rtyler Aug 18, 2015

Here's a sample script that reproduces this, since it wasn't immediately obvious from the report:

require 'kconv'

"test".isutf8

rtyler commented Aug 18, 2015

Here's a sample script that reproduces this, since it wasn't immediately obvious from the report:

require 'kconv'

"test".isutf8
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Aug 18, 2015

Member

This appears to be the same issue as jruby/jruby#338.

Member

headius commented Aug 18, 2015

This appears to be the same issue as jruby/jruby#338.

@rtyler

This comment has been minimized.

Show comment
Hide comment
@rtyler

rtyler Aug 18, 2015

@headius the same issue as a three year old bug? 😿

rtyler commented Aug 18, 2015

@headius the same issue as a three year old bug? 😿

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Aug 18, 2015

Member

Yeah...we need to fix NKF to define those constants as Encoding instances and do the mapping back and forth to NKF encoding ints.

Member

headius commented Aug 18, 2015

Yeah...we need to fix NKF to define those constants as Encoding instances and do the mapping back and forth to NKF encoding ints.

@k77ch7

This comment has been minimized.

Show comment
Hide comment
@k77ch7

k77ch7 Jan 22, 2016

Contributor

@headius the above sample script doesn't reproduce. Works for me.

my env

$ ruby -v
jruby 9.0.5.0-SNAPSHOT (2.2.3) 2016-01-22 1761e2e Java HotSpot(TM) 64-Bit Server VM 25.66-b17 on 1.8.0_66-b17 +jit [darwin-x86_64]
Contributor

k77ch7 commented Jan 22, 2016

@headius the above sample script doesn't reproduce. Works for me.

my env

$ ruby -v
jruby 9.0.5.0-SNAPSHOT (2.2.3) 2016-01-22 1761e2e Java HotSpot(TM) 64-Bit Server VM 25.66-b17 on 1.8.0_66-b17 +jit [darwin-x86_64]
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 14, 2016

Member

@k77ch7 Hmm, you're right. I'll poke around a bit and see if there's any reason not to close this.

Member

headius commented Feb 14, 2016

@k77ch7 Hmm, you're right. I'll poke around a bit and see if there's any reason not to close this.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 14, 2016

Member

Ah-ha, our good friend @kares is responsible for fixing this in cfdccd7.

I'm removing the 1.8 paths for JRuby 9.1.0.0 but otherwise we'll call this fixed. I'll also investigate whether we've got some tests to untag/unexclude.

Member

headius commented Feb 14, 2016

Ah-ha, our good friend @kares is responsible for fixing this in cfdccd7.

I'm removing the 1.8 paths for JRuby 9.1.0.0 but otherwise we'll call this fixed. I'll also investigate whether we've got some tests to untag/unexclude.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 14, 2016

Member

I removed the 1.8 paths in ecae248.

There does not appear to be any tests for the kconv.rb functionality right now.

Member

headius commented Feb 14, 2016

I removed the 1.8 paths in ecae248.

There does not appear to be any tests for the kconv.rb functionality right now.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 14, 2016

Member

Ok scratch that...there's nkf/test_kconv.rb. I'll fiddle with it for a bit and see if I can get it passing.

Member

headius commented Feb 14, 2016

Ok scratch that...there's nkf/test_kconv.rb. I'll fiddle with it for a bit and see if I can get it passing.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Feb 14, 2016

Member

So it appears most of the remaining failures in test_kconv.rb are due to our NKF library still using Charset transcoding rather than jcodings. I'm going to resolve this and file another issue to get those fixed. That should give us the test coverage we want for this issue.

Member

headius commented Feb 14, 2016

So it appears most of the remaining failures in test_kconv.rb are due to our NKF library still using Charset transcoding rather than jcodings. I'm going to resolve this and file another issue to get those fixed. That should give us the test coverage we want for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment