From: ara.t.howard@... Date: 2006-03-26T00:42:34+09:00 Subject: Re: require a certain version of the ruby interpreter On Sun, 26 Mar 2006 dblack@wobblini.net wrote: >> my point is that this code does not 'ensure' version 1.8.4 - it blows up >> unless >> version 1.8.x. > > I think you've discovered Duck Versioning: > > [].zip([]) rescue NameError "You need a later Ruby" > > :-) you may be joking but this is really good! harp:~ > cat a.rb "1.8.4".respond_to?("any?") or raise "require 1.8.4" [].inject([]) harp:~ > ruby184 a.rb harp:~ > ruby168 a.rb a.rb:1: require 1.8.4 (RuntimeError) one simply needs to select a single method that exists starting in the required version. regards. -a -- share your knowledge. it's a way to achieve immortality. - h.h. the 14th dali lama