Skip to content

Commit

Permalink
Merge branch 'master' into 10-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Nov 11, 2024
2 parents bf2db33 + 6f9df83 commit 637a990
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 25 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/org/jruby/ir/builder/IRBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
14 changes: 13 additions & 1 deletion lib/pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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|
Expand Down
8 changes: 4 additions & 4 deletions lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ DO NOT MODIFY - GENERATED CODE
<dependency>
<groupId>rubygems</groupId>
<artifactId>stringio</artifactId>
<version>3.1.0</version>
<version>3.1.2</version>
<type>gem</type>
<scope>provided</scope>
<exclusions>
Expand Down Expand Up @@ -1160,7 +1160,7 @@ DO NOT MODIFY - GENERATED CODE
<include>specifications/securerandom-0.3.1*</include>
<include>specifications/shellwords-0.2.0*</include>
<include>specifications/singleton-0.2.0*</include>
<include>specifications/stringio-3.1.0*</include>
<include>specifications/stringio-3.1.2*</include>
<include>specifications/strscan-3.1.0*</include>
<include>specifications/subspawn-0.1.1*</include>
<include>specifications/subspawn-posix-0.1.1*</include>
Expand Down Expand Up @@ -1242,7 +1242,7 @@ DO NOT MODIFY - GENERATED CODE
<include>gems/securerandom-0.3.1*/**/*</include>
<include>gems/shellwords-0.2.0*/**/*</include>
<include>gems/singleton-0.2.0*/**/*</include>
<include>gems/stringio-3.1.0*/**/*</include>
<include>gems/stringio-3.1.2*/**/*</include>
<include>gems/strscan-3.1.0*/**/*</include>
<include>gems/subspawn-0.1.1*/**/*</include>
<include>gems/subspawn-posix-0.1.1*/**/*</include>
Expand Down Expand Up @@ -1324,7 +1324,7 @@ DO NOT MODIFY - GENERATED CODE
<include>cache/securerandom-0.3.1*</include>
<include>cache/shellwords-0.2.0*</include>
<include>cache/singleton-0.2.0*</include>
<include>cache/stringio-3.1.0*</include>
<include>cache/stringio-3.1.2*</include>
<include>cache/strscan-3.1.0*</include>
<include>cache/subspawn-0.1.1*</include>
<include>cache/subspawn-posix-0.1.1*</include>
Expand Down
7 changes: 7 additions & 0 deletions spec/tags/ruby/library/stringio/reopen_tags.txt
Original file line number Diff line number Diff line change
@@ -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
17 changes: 0 additions & 17 deletions spec/tags/ruby/library/stringio/set_encoding_by_bom_tags.txt
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions test/mri/excludes/TestStringIO.rb
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 637a990

Please sign in to comment.