Skip to content
  • Charles Oliver Nutter's avatar
    33641e00
    Remove private_iv_get · 33641e00
    Charles Oliver Nutter authored
    The only remaining use of this function was to get the internal
    message object from an exception's hidden `mesg` instance
    variable to allow it to be dumped wiithout converting to a string.
    
    As discussed in #103, this exposes internal implementation details
    of CRuby, and ultimately does not provide any real utility to the
    user since they can't directly inspect this hidden variable. The
    test change here is to reflect CRuby behavior that denies equality
    if the internal message objects do not match, as is the case after
    the exception has been loaded and now has a simple String value.
    
    The impact to users is that exceptions with special hidden message
    objects will convert those objects to String during marshaling
    through YAML. I believe this only affects NameError and its
    descendants, since users can't set this field directly on their
    own exception types.
    
    Fixes #103.
    33641e00
    Remove private_iv_get
    Charles Oliver Nutter authored
    The only remaining use of this function was to get the internal
    message object from an exception's hidden `mesg` instance
    variable to allow it to be dumped wiithout converting to a string.
    
    As discussed in #103, this exposes internal implementation details
    of CRuby, and ultimately does not provide any real utility to the
    user since they can't directly inspect this hidden variable. The
    test change here is to reflect CRuby behavior that denies equality
    if the internal message objects do not match, as is the case after
    the exception has been loaded and now has a simple String value.
    
    The impact to users is that exceptions with special hidden message
    objects will convert those objects to String during marshaling
    through YAML. I believe this only affects NameError and its
    descendants, since users can't set this field directly on their
    own exception types.
    
    Fixes #103.
Loading