You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# coding: utf-8
# 'α'.bytes => [206, 177]
class C_α
p self.to_s.bytes
end
run with jruby 9.1.9.0
$ jruby blah.rb
[67, 95, 206, 177]
compile with --java
$ jrubyc --java blah.rb
Encoding::CompatibilityError: incompatible encodings: ASCII-8BIT and UTF-8
static_init at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler/java_class.rb:396
to_s at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler/java_class.rb:492
block in compile_files_with_options at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:155
open at org/jruby/RubyIO.java:1156
block in compile_files_with_options at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:154
each at org/jruby/RubyArray.java:1734
block in compile_files_with_options at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:144
block in compile_files_with_options at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:297
each at org/jruby/RubyArray.java:1734
compile_files_with_options at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:281
compile_argv at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/lib/ruby/stdlib/jruby/compiler.rb:94
<main> at /Users/xxxxxx/.rbenv/versions/jruby-9.1.9.0/bin/jrubyc:5
compile without --java and run
$ jrubyc blah.rb
$ jruby blah.class
LoadError: blah.class is not compiled Ruby; use java_import to load normal classes
Environment
$ jruby -v
jruby 9.1.9.0 (2.3.3) 2017-05-15 28aa830 Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 +jit [darwin-x86_64]
$ uname -a
Darwin mac-mini.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan 9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
The text was updated successfully, but these errors were encountered:
blah.rb
run with jruby 9.1.9.0
compile with --java
compile without --java and run
Environment
The text was updated successfully, but these errors were encountered: