Skip to content

Commit 5dd49f1

Browse files
committed
[GR-35563] Backports for 22.0 batch 1
PullRequest: truffleruby/3087
2 parents 60ba7a3 + 93f9aea commit 5dd49f1

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

lib/mri/pp.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,11 @@ def seplist(list, sep=nil, iter_method=:each) # :yield: element
237237
else
238238
sep.call
239239
end
240-
yield(*v, **{})
240+
if defined?(::TruffleRuby)
241+
yield(*v)
242+
else
243+
yield(*v, **{})
244+
end
241245
}
242246
end
243247

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name": "regex",
99
"subdir": True,
10-
"version": "cad2eb45dc739af015f88e05012593d0ec15d465",
10+
"version": "a8e3d29028a6d86bf8fda82462443f5cea64f1e3",
1111
"urls": [
1212
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1313
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -16,7 +16,7 @@
1616
{
1717
"name": "sulong",
1818
"subdir": True,
19-
"version": "cad2eb45dc739af015f88e05012593d0ec15d465",
19+
"version": "a8e3d29028a6d86bf8fda82462443f5cea64f1e3",
2020
"urls": [
2121
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2222
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

spec/ruby/library/pp/pp_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,11 @@
2020

2121
other_out.to_s.should == "[1, 2, 3]\n"
2222
end
23+
24+
it 'correctly prints a Hash' do
25+
hash = { 'key' => 42 }
26+
-> {
27+
PP.pp hash
28+
}.should output('{"key"=>42}' + "\n")
29+
end
2330
end

0 commit comments

Comments
 (0)