diff --git a/spec/jruby.1.9.mspec b/spec/jruby.1.9.mspec index 899c82baabc..3ae8f0977ae 100644 --- a/spec/jruby.1.9.mspec +++ b/spec/jruby.1.9.mspec @@ -68,6 +68,10 @@ class MSpecScript # Command Line specs set :command_line, [ SPEC_DIR + '/command_line' ] + # Enable features + MSpec.enable_feature :fiber + MSpec.enable_feature :encoding + if WINDOWS # Some specs on Windows will fail in we launch JRuby via # ruby_exe() in-process (see core/argf/gets_spec.rb) diff --git a/spec/tags/1.9/ruby/core/array/pack_tags.txt b/spec/tags/1.9/ruby/core/array/pack_tags.txt index c7737a40b83..5e1bc3bb694 100644 --- a/spec/tags/1.9/ruby/core/array/pack_tags.txt +++ b/spec/tags/1.9/ruby/core/array/pack_tags.txt @@ -47,3 +47,4 @@ fails:Array#pack with format 'a' returns result in ASCII-8BIT fails:Array#pack with format 'Z' treats a multibyte character just as a byte sequence fails:Array#pack with format 'Z' returns result in ASCII-8BIT fails:Array#pack with format 'm' ignores star parameter +fails:Array#pack with format 'U' regards a integer as a Unicode codepoint and encodes into UTF-8 byte sequence diff --git a/spec/tags/1.9/ruby/core/encoding/aliases_tags.txt b/spec/tags/1.9/ruby/core/encoding/aliases_tags.txt index 957d58de1d2..d79938cc3f7 100644 --- a/spec/tags/1.9/ruby/core/encoding/aliases_tags.txt +++ b/spec/tags/1.9/ruby/core/encoding/aliases_tags.txt @@ -1,2 +1,2 @@ fails:Encoding.aliases has an 'external' key with the external default encoding as its value -fails:Encoding.aliases has a 'locale' key with the locale charmap encoding as its value +fails:Encoding.aliases has a 'locale' key and its value equals to the name of the encoding finded by the locale charmap diff --git a/spec/tags/1.9/ruby/core/encoding/converter/replacement_tags.txt b/spec/tags/1.9/ruby/core/encoding/converter/replacement_tags.txt index 4b19c45d6c8..3ebad69a583 100644 --- a/spec/tags/1.9/ruby/core/encoding/converter/replacement_tags.txt +++ b/spec/tags/1.9/ruby/core/encoding/converter/replacement_tags.txt @@ -1,6 +1,5 @@ fails:Encoding::Converter#replacement returns '?' in US-ASCII when the destination encoding is not UTF-8 fails:Encoding::Converter#replacement returns u{fffd} when the destination encoding is UTF-8 -fails:Encoding::Converter#replacement= accepts a String argument fails:Encoding::Converter#replacement= accepts a String argument of arbitrary length fails:Encoding::Converter#replacement= raises an TypeError if assigned a non-String argument fails:Encoding::Converter#replacement= sets #replacement diff --git a/spec/tags/1.9/ruby/core/encoding/locale_charmap_tags.txt b/spec/tags/1.9/ruby/core/encoding/locale_charmap_tags.txt index d5aa097dbea..660a500efac 100644 --- a/spec/tags/1.9/ruby/core/encoding/locale_charmap_tags.txt +++ b/spec/tags/1.9/ruby/core/encoding/locale_charmap_tags.txt @@ -1 +1 @@ -fails:Encoding.locale_charmap returns a value based on the LANG environment variable +fails:Encoding.locale_charmap returns a value based on the LC_ALL environment variable diff --git a/spec/tags/1.9/ruby/core/fiber/resume_tags.txt b/spec/tags/1.9/ruby/core/fiber/resume_tags.txt index 62be9b93bf5..c7ecd0cf04f 100644 --- a/spec/tags/1.9/ruby/core/fiber/resume_tags.txt +++ b/spec/tags/1.9/ruby/core/fiber/resume_tags.txt @@ -11,3 +11,6 @@ critical(hangs):Fiber#resume runs until the end of the block or Fiber.yield on f critical(hangs):Fiber#resume sets the block parameters to its arguments on the first invocation critical(hangs):Fiber#resume raises a FiberError if the Fiber has transfered control to another Fiber fails:Fiber#resume executes the ensure clause +fails:Fiber#resume raises a FiberError if the Fiber is dead +fails:Fiber#resume raises a LocalJumpError if the block includes a return statement +fails:Fiber#resume raises a LocalJumpError if the block includes a break statement diff --git a/spec/tags/1.9/ruby/core/string/bytes_tags.txt b/spec/tags/1.9/ruby/core/string/bytes_tags.txt new file mode 100644 index 00000000000..0490a397520 --- /dev/null +++ b/spec/tags/1.9/ruby/core/string/bytes_tags.txt @@ -0,0 +1,2 @@ +fails:String#bytes agrees with #getbyte +fails:String#bytes is unaffected by #force_encoding diff --git a/spec/tags/1.9/ruby/core/string/clear_tags.txt b/spec/tags/1.9/ruby/core/string/clear_tags.txt index e1e7842360e..f193de331dd 100644 --- a/spec/tags/1.9/ruby/core/string/clear_tags.txt +++ b/spec/tags/1.9/ruby/core/string/clear_tags.txt @@ -1,2 +1,3 @@ critical(crashes when executed along with ascii_only_spec.rb):String#clear preserves its encoding fails:String#clear raises a RuntimeError if self is frozen +fails:String#clear preserves its encoding diff --git a/spec/tags/1.9/ruby/core/string/encode_tags.txt b/spec/tags/1.9/ruby/core/string/encode_tags.txt index e153e5f3bf8..0ad94c6467f 100644 --- a/spec/tags/1.9/ruby/core/string/encode_tags.txt +++ b/spec/tags/1.9/ruby/core/string/encode_tags.txt @@ -8,3 +8,11 @@ fails:String#encode replaces xml characters and quotes the result fails:String#encode returns a copy of self when called with only a target encoding fails:String#encode returns self when called with only a target encoding fails:String#encode returns a String with the given encoding +fails:String#encode! transcodes to the default internal encoding with no argument +fails:String#encode! transcodes self to the given encoding +fails:String#encode! raises UndefinedConversionError if the String contains characters invalid for the target encoding +fails:String#encode! replaces invalid characters +fails:String#encode! replaces undefined characters +fails:String#encode! replaces xml characters +fails:String#encode! replaces xml characters and quotes the result +fails:String#encode! tags the String with the given encoding diff --git a/src/org/jruby/RubyConverter.java b/src/org/jruby/RubyConverter.java index 1655caec430..da24ad20eb9 100644 --- a/src/org/jruby/RubyConverter.java +++ b/src/org/jruby/RubyConverter.java @@ -26,8 +26,10 @@ package org.jruby; import org.jruby.anno.JRubyClass; +import org.jruby.anno.JRubyMethod; import org.jruby.runtime.ClassIndex; import org.jruby.runtime.ObjectAllocator; +import org.jruby.runtime.ThreadContext; import org.jruby.runtime.builtin.IRubyObject; @JRubyClass(name="Converter") @@ -62,4 +64,9 @@ public RubyConverter(Ruby runtime, RubyClass klass) { public RubyConverter(Ruby runtime) { super(runtime, runtime.getConverter()); } + + @JRubyMethod(name = "convpath", compat = CompatVersion.RUBY1_9) + public IRubyObject convpath(ThreadContext context) { + return context.getRuntime().getNil(); + } }