From: Robert Klemme Date: 2009-12-21T17:18:43+09:00 Subject: Re: Splat array with 1 value in Ruby 1.9 vs Ruby 1.8 2009/12/20 Benoit Daloze : >> Thanks for your answer, I think in fact creating 2 methods is the best way. > And to keep it very simple I can do: > > def vars >  ... # => Array > end > def var >  vars.shift > end That's a good approach. By that you can still change the implementation of #var if it proves to be too slow (e.g. if you are often scanning large strings and the single match is at the beginning). Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/