lib/lru_redux.rb in lru_redux-0.0.4 vs lib/lru_redux.rb in lru_redux-0.0.5

- old
+ new

@@ -1,4 +1,14 @@ -module LruRedux; end +module LruRedux + def self.is_19? + major,minor = RUBY_VERSION.split(".").map{|a| a.to_i} + major > 1 || (major == 1 && minor > 8) + end +end + require "lru_redux/version" -require "lru_redux/cache" +if LruRedux.is_19? + require "lru_redux/cache19" +else + require "lru_redux/cache" +end require "lru_redux/thread_safe_cache"