Skip to content
  • U.Nakamura's avatar
    19fec939
    merge revision(s) c79d2e54: [Backport #18562] · 19fec939
    U.Nakamura authored
        Fix TAG_THROW through require [Bug #18562]
    
        Previously this was being incorrectly swapped with TAG_RAISE in the next
        line. This would end up checking the T_IMEMO throw_data to the exception
        handling (which calls Module#===). This happened to not break existing
        tests because Module#=== returned false when klass is NULL.
    
        This commit handles throw from require correctly by jumping to the tag
        retaining the TAG_THROW state.
        ---
         load.c                      |  2 +-
         test/ruby/test_exception.rb | 21 +++++++++++++++++++++
         2 files changed, 22 insertions(+), 1 deletion(-)
    19fec939
    merge revision(s) c79d2e54: [Backport #18562]
    U.Nakamura authored
        Fix TAG_THROW through require [Bug #18562]
    
        Previously this was being incorrectly swapped with TAG_RAISE in the next
        line. This would end up checking the T_IMEMO throw_data to the exception
        handling (which calls Module#===). This happened to not break existing
        tests because Module#=== returned false when klass is NULL.
    
        This commit handles throw from require correctly by jumping to the tag
        retaining the TAG_THROW state.
        ---
         load.c                      |  2 +-
         test/ruby/test_exception.rb | 21 +++++++++++++++++++++
         2 files changed, 22 insertions(+), 1 deletion(-)
Loading