Skip to content
  • Jeremy Evans's avatar
    2e551356
    Make Kernel#{Pathname,BigDecimal,Complex} return argument if given correct type · 2e551356
    Jeremy Evans authored
    This is how Kernel#{Array,String,Float,Integer,Hash,Rational} work.
    BigDecimal and Complex instances are always frozen, so this should
    not cause backwards compatibility issues for those.  Pathname
    instances are not frozen, so potentially this could cause backwards
    compatibility issues by not returning a new object.
    
    Based on a patch from Joshua Ballanco, some minor changes by me.
    
    Fixes [Bug #7522]
    2e551356
    Make Kernel#{Pathname,BigDecimal,Complex} return argument if given correct type
    Jeremy Evans authored
    This is how Kernel#{Array,String,Float,Integer,Hash,Rational} work.
    BigDecimal and Complex instances are always frozen, so this should
    not cause backwards compatibility issues for those.  Pathname
    instances are not frozen, so potentially this could cause backwards
    compatibility issues by not returning a new object.
    
    Based on a patch from Joshua Ballanco, some minor changes by me.
    
    Fixes [Bug #7522]
Loading