diff options
-rw-r--r-- | compile.c | 3 | ||||
-rw-r--r-- | test/ruby/test_iseq.rb | 1 |
2 files changed, 3 insertions, 1 deletions
@@ -9259,6 +9259,7 @@ ibf_dump_object_struct(struct ibf_dump *dump, VALUE obj) range.beg = (long)ibf_dump_object(dump, beg); range.end = (long)ibf_dump_object(dump, end); + IBF_W_ALIGN(struct ibf_object_struct_range); IBF_WV(range); } else { @@ -9425,7 +9426,7 @@ ibf_dump_object_object(struct ibf_dump *dump, VALUE obj) IBF_ZERO(obj_header); obj_header.type = TYPE(obj); - ibf_dump_align(dump, sizeof(ibf_offset_t)); + IBF_W_ALIGN(ibf_offset_t); current_offset = ibf_dump_pos(dump); if (SPECIAL_CONST_P(obj)) { diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 2ef344741b..86aad2da69 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -423,6 +423,7 @@ class TestISeq < Test::Unit::TestCase def test_to_binary_with_objects assert_iseq_to_binary("[]"+100.times.map{|i|"<</#{i}/"}.join) + assert_iseq_to_binary("@x ||= (1..2)") end def test_to_binary_line_info |