danielpclark / faster_path

Faster Pathname handling for Ruby written in Rust
MIT License
781 stars 29 forks source link

Conditionally remove FasterPath.basename from File.basename in refinements/monkeypatches #63

Closed danielpclark closed 8 years ago

danielpclark commented 8 years ago

Before the 0.1.8 release, which introduced a performance regression in FasterPath.basenames performance, it was confirmed of a few 32 bit OS instances had slower performance. Regardless it should not be included in the default refinements and monkeypatches. Add an environment variable to flag code inclusion on only the refinement and monkeypatch.

class Example
  # code
end if ENV['WITH_REGRESSION'].to_s['true']
danielpclark commented 8 years ago

Found a solution!