Skip to content
  • Yusuke Endoh's avatar
    2cc3963a
    Prevent wrong integer expansion · 2cc3963a
    Yusuke Endoh authored
    `(attr_index + 1)` leads to wrong integer expansion on 32-bit machines
    (including Solaris 10 CI) because `attr_index_t` is uint16_t.
    
    http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20221013T080004Z.fail.html.gz
    ```
      1) Failure:
    TestRDocClassModule#test_marshal_load_version_2 [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_class_module.rb:493]:
    <[doc: [doc (file.rb): [para: "this is a comment"]]]> expected but was
    <[doc: [doc (file.rb): [para: "this is a comment"]]]>.
    
      2) Failure:
    TestRDocStats#test_report_method_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:460]:
    Expected /\#\ in\ file\ file\.rb:4/ to match "The following items are not documented:\n" +
    "\n" +
    "  class C # is documented\n" +
    "\n" +
    "    # in file file.rb\n" +
    "    def m1; end\n" +
    "\n" +
    "  end\n" +
    "\n" +
    "\n".
    
      3) Failure:
    TestRDocStats#test_report_attr_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:91]:
    Expected /\#\ in\ file\ file\.rb:3/ to match "The following items are not documented:\n" +
    "\n" +
    "  class C # is documented\n" +
    "\n" +
    "    attr_accessor :a # in file file.rb\n" +
    "\n" +
    "  end\n" +
    "\n" +
    "\n".
    ```
    2cc3963a
    Prevent wrong integer expansion
    Yusuke Endoh authored
    `(attr_index + 1)` leads to wrong integer expansion on 32-bit machines
    (including Solaris 10 CI) because `attr_index_t` is uint16_t.
    
    http://rubyci.s3.amazonaws.com/solaris10-gcc/ruby-master/log/20221013T080004Z.fail.html.gz
    ```
      1) Failure:
    TestRDocClassModule#test_marshal_load_version_2 [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_class_module.rb:493]:
    <[doc: [doc (file.rb): [para: "this is a comment"]]]> expected but was
    <[doc: [doc (file.rb): [para: "this is a comment"]]]>.
    
      2) Failure:
    TestRDocStats#test_report_method_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:460]:
    Expected /\#\ in\ file\ file\.rb:4/ to match "The following items are not documented:\n" +
    "\n" +
    "  class C # is documented\n" +
    "\n" +
    "    # in file file.rb\n" +
    "    def m1; end\n" +
    "\n" +
    "  end\n" +
    "\n" +
    "\n".
    
      3) Failure:
    TestRDocStats#test_report_attr_line [/export/home/users/chkbuild/cb-gcc/tmp/build/20221013T080004Z/ruby/test/rdoc/test_rdoc_stats.rb:91]:
    Expected /\#\ in\ file\ file\.rb:3/ to match "The following items are not documented:\n" +
    "\n" +
    "  class C # is documented\n" +
    "\n" +
    "    attr_accessor :a # in file file.rb\n" +
    "\n" +
    "  end\n" +
    "\n" +
    "\n".
    ```
Loading