From: Todd Benson Date: 2008-09-29T09:00:19+09:00 Subject: Re: Merging hashes and having trouble with variable scope! On Sun, Sep 28, 2008 at 11:00 AM, Todd Benson wrote: > class Range > def self.[](str) > begin > a = str.split(/-/) > a[1] ||= [0] > new(*(a.map {|i| Integer(i)})) rescue str > end > end > end Another typo of mine. The a[1] ||= [0] should be a[1] ||= a[0]. My apologies for these minor things, but I hand type in my answers, because, in using Gmail, my cut and pastes sometimes get "folded" (unseen unless "- Show quoted text -" is clicked upon). Todd