diff --git a/core/src/main/java/org/jruby/ir/builder/IRBuilder.java b/core/src/main/java/org/jruby/ir/builder/IRBuilder.java index d832bb05593..da7ca0339a2 100644 --- a/core/src/main/java/org/jruby/ir/builder/IRBuilder.java +++ b/core/src/main/java/org/jruby/ir/builder/IRBuilder.java @@ -1741,11 +1741,10 @@ protected Variable buildDefnCheckIfThenPaths(Label undefLabel, Operand defVal) { } public Operand buildMatch(Variable result, Operand regexp) { - Variable tempLastLine = temp(); - addResultInstr(new GetGlobalVariableInstr(tempLastLine, symbol("$_"))); + Variable lastLine = addResultInstr(new GetGlobalVariableInstr(temp(), symbol("$_"))); if (result == null) result = temp(); - return addResultInstr(new MatchInstr(scope, result, regexp, tempLastLine)); + return addResultInstr(new MatchInstr(scope, result, regexp, lastLine)); } protected Operand buildModule(ByteList name, U cpath, U bodyNode, StaticScope scope, int line, int endLine) { diff --git a/lib/pom.rb b/lib/pom.rb index bd5fb355567..109665a3d20 100644 --- a/lib/pom.rb +++ b/lib/pom.rb @@ -83,7 +83,7 @@ def log(message=nil) # ['set', '1.0.2'], ['shellwords', '0.2.0'], ['singleton', '0.2.0'], - ['stringio', '3.1.0'], + ['stringio', '3.1.2'], ['strscan', '3.1.0'], ['subspawn', '0.1.1'], # has 3 transitive deps: ['subspawn-posix', '0.1.1'], @@ -253,6 +253,18 @@ def log(message=nil) File.join(global_bin, "jruby#{RbConfig::CONFIG['EXEEXT']}") end + # Disable extension build for gems (none of ours require a build) + class Gem::Ext::Builder + def build_extensions + return if @spec.extensions.empty? + + say "Skipping native extensions." + + FileUtils.mkdir_p File.dirname(@spec.gem_build_complete_path) + FileUtils.touch @spec.gem_build_complete_path + end + end + ctx.project.artifacts.select do |a| a.group_id == 'rubygems' || a.group_id == 'org.jruby.gems' end.each do |a| diff --git a/lib/pom.xml b/lib/pom.xml index e7ed557be83..b02733f3b3c 100644 --- a/lib/pom.xml +++ b/lib/pom.xml @@ -580,7 +580,7 @@ DO NOT MODIFY - GENERATED CODE rubygems stringio - 3.1.0 + 3.1.2 gem provided @@ -1160,7 +1160,7 @@ DO NOT MODIFY - GENERATED CODE specifications/securerandom-0.3.1* specifications/shellwords-0.2.0* specifications/singleton-0.2.0* - specifications/stringio-3.1.0* + specifications/stringio-3.1.2* specifications/strscan-3.1.0* specifications/subspawn-0.1.1* specifications/subspawn-posix-0.1.1* @@ -1242,7 +1242,7 @@ DO NOT MODIFY - GENERATED CODE gems/securerandom-0.3.1*/**/* gems/shellwords-0.2.0*/**/* gems/singleton-0.2.0*/**/* - gems/stringio-3.1.0*/**/* + gems/stringio-3.1.2*/**/* gems/strscan-3.1.0*/**/* gems/subspawn-0.1.1*/**/* gems/subspawn-posix-0.1.1*/**/* @@ -1324,7 +1324,7 @@ DO NOT MODIFY - GENERATED CODE cache/securerandom-0.3.1* cache/shellwords-0.2.0* cache/singleton-0.2.0* - cache/stringio-3.1.0* + cache/stringio-3.1.2* cache/strscan-3.1.0* cache/subspawn-0.1.1* cache/subspawn-posix-0.1.1* diff --git a/spec/tags/ruby/library/stringio/reopen_tags.txt b/spec/tags/ruby/library/stringio/reopen_tags.txt new file mode 100644 index 00000000000..0f7f7e409ae --- /dev/null +++ b/spec/tags/ruby/library/stringio/reopen_tags.txt @@ -0,0 +1,7 @@ +fails:StringIO#reopen when passed [Object, Integer] reopens self with the passed Object in the passed mode +fails:StringIO#reopen when passed [Object, Integer] raises a FrozenError when trying to reopen self with a frozen String in truncate-mode +fails:StringIO#reopen when passed [Object, Integer] does not raise IOError when passed a frozen String in read-mode +fails:StringIO#reopen when passed [Object, Object] reopens self with the passed Object in the passed mode +fails:StringIO#reopen when passed [Object, Object] tries to convert the passed mode Object to an Integer using #to_str +fails:StringIO#reopen when passed [Object, Object] does not raise IOError if a frozen string is passed in read mode +fails:StringIO#reopen reopens a stream when given a String argument diff --git a/spec/tags/ruby/library/stringio/set_encoding_by_bom_tags.txt b/spec/tags/ruby/library/stringio/set_encoding_by_bom_tags.txt index 59c5e97111e..244cb5ad771 100644 --- a/spec/tags/ruby/library/stringio/set_encoding_by_bom_tags.txt +++ b/spec/tags/ruby/library/stringio/set_encoding_by_bom_tags.txt @@ -1,18 +1 @@ -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if not readable -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns the result encoding if found BOM UTF-8 sequence -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns the result encoding if found BOM UTF_16LE sequence -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns the result encoding if found BOM UTF_16BE sequence -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns the result encoding if found BOM UTF_32LE sequence -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns the result encoding if found BOM UTF_32BE sequence -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if io is empty -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if UTF-8 BOM sequence is incomplete -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if UTF-16BE BOM sequence is incomplete -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if UTF-16LE/UTF-32LE BOM sequence is incomplete -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns UTF-16LE if UTF-32LE BOM sequence is incomplete -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if UTF-32BE BOM sequence is incomplete -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom returns nil if found BOM sequence not provided -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom does not raise exception if io not in binary mode -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom does not raise exception if encoding already set -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom does not raise exception if encoding conversion is already set fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom raises FrozenError when io is frozen -fails(waiting on release of ruby/stringio#101):StringIO#set_encoding_by_bom does not raise FrozenError when initial string is frozen diff --git a/test/mri/excludes/TestStringIO.rb b/test/mri/excludes/TestStringIO.rb index d9465da6c5b..9a7427277b9 100644 --- a/test/mri/excludes/TestStringIO.rb +++ b/test/mri/excludes/TestStringIO.rb @@ -1,3 +1,6 @@ +exclude :test_each, "needs investigation" +exclude :test_gets_chomp, "needs investigation" +exclude :test_gets_chomp_eol, "needs investigation" exclude :test_overflow, "unusual subprocess test trying to overflow some value" exclude :test_read_nonblock_no_exceptions, "temporary until StringIO ext does manual arity-checking (ruby/stringio#48)" exclude :test_write_integer_overflow, "JVM does not support > 32bit signed array offsets, so our StringIO cannot either"