rdp / os

The OS gem allows for some easy telling if you’re on windows or not. OS.windows? as well as some other helper utilities
MIT License
145 stars 33 forks source link

could be more efficient #8

Closed rdp closed 12 years ago

rdp commented 13 years ago

ex:

class OS
  if RUBY_DESCRIPTION =~ /mingw/
    def windows?; true; end
  else
   def windows? false; end
  end
end

That type of thing.

rdp commented 12 years ago

or would this actually be less efficient, since it has to do extra lookup checks at runtime :P