summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-09 06:46:44 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-09 06:46:44 +0000
commit4f131605c30cf952240b97729cf74991801ce4c3 (patch)
tree1b7e717f3336839ea2d76bbd35e90749ed5db6c6
parent352e8e9c49f8e8e5cf263d7fb9ff58a671a8c105 (diff)
conceptually partial backport from r63103, r65567.
All ISeq#to_binary should rescue to skip when running with coverage. current trunk (2.6-) has assert_iseq_to_binary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@66298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_iseq.rb16
-rw-r--r--version.h2
2 files changed, 16 insertions, 2 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index a8eb718f21..ed88c9b43d 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -392,6 +392,9 @@ class TestISeq < Test::Unit::TestCase
end
def test_to_binary_with_objects
+ # conceptually backport from r62856.
+ # ISeq binary dump doesn't consider alignment in 2.5 and older
+ skip "does not work on other than x86" unless /x(?:86|64)|i\d86/ =~ RUBY_PLATFORM
code = "[]"+100.times.map{|i|"<</#{i}/"}.join
iseq = RubyVM::InstructionSequence.compile(code)
bin = assert_nothing_raised do
@@ -405,9 +408,20 @@ class TestISeq < Test::Unit::TestCase
end
def test_to_binary_tracepoint
+ # conceptually backport from r62856.
+ # ISeq binary dump doesn't consider alignment in 2.5 and older
+ skip "does not work on other than x86" unless /x(?:86|64)|i\d86/ =~ RUBY_PLATFORM
filename = "#{File.basename(__FILE__)}_#{__LINE__}"
iseq = RubyVM::InstructionSequence.compile("x = 1\n y = 2", filename)
- iseq_bin = iseq.to_binary
+ # conceptually partial backport from r63103, r65567.
+ # All ISeq#to_binary should rescue to skip when running with coverage.
+ # current trunk (2.6-) has assert_iseq_to_binary.
+ begin
+ iseq_bin = iseq.to_binary
+ rescue RuntimeError => e
+ skip e.message if /compile with coverage/ =~ e.message
+ raise
+ end
ary = []
TracePoint.new(:line){|tp|
next unless tp.path == filename
diff --git a/version.h b/version.h
index 4d8f44f02f..07a5e8738c 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.5.4"
#define RUBY_RELEASE_DATE "2018-12-09"
-#define RUBY_PATCHLEVEL 121
+#define RUBY_PATCHLEVEL 122
#define RUBY_RELEASE_YEAR 2018
#define RUBY_RELEASE_MONTH 12