Skip to content
  • Akinori MUSHA's avatar
    545b6e58
    Remove the Kernel#` override that turns ENOENT into nil · 545b6e58
    Akinori MUSHA authored
    ActiveSupport overrides `` Kernel#` `` so that it would not raise
    `Errno::ENOENT` but return `nil` instead (due to the last statement
    `STDERR.puts` returning nil) if a given command were not found.
    Because of this, you cannot safely say somthing like
    `` `command`.chomp `` when ActiveSupport is loaded.
    
    It turns out that this is an outdated monkey patch for Windows
    platforms to emulate Unix behavior on an ancient version of Ruby, and
    it should be removed by now.
    545b6e58
    Remove the Kernel#` override that turns ENOENT into nil
    Akinori MUSHA authored
    ActiveSupport overrides `` Kernel#` `` so that it would not raise
    `Errno::ENOENT` but return `nil` instead (due to the last statement
    `STDERR.puts` returning nil) if a given command were not found.
    Because of this, you cannot safely say somthing like
    `` `command`.chomp `` when ActiveSupport is loaded.
    
    It turns out that this is an outdated monkey patch for Windows
    platforms to emulate Unix behavior on an ancient version of Ruby, and
    it should be removed by now.
Loading