James Edward Gray II wrote: > I'm not understanding what I am seeing here. Can anyone please > explain why the last line of this session gives *false* as an answer? > > >> range = ("1".."10") > => "1".."10" > >> range.to_a > => ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"] > >> range.member?("1") > => true > >> range.member?("2") > => false > > James Edward Gray II > > > Hi, There was some discussion about this in the recent past. If my memory serves me right (certainly an infrequent happening), the issue that you're running into is that Range#member? is implemented as: class Range def member?(val) if self.exclude_end? (self.first <= val) and (val < self.last) else (self.first <= val) and (val <= self.last) end end end You should find this in both 1.8.2 and 1.8.4 I think. There's a previous thread on ruby-talk about it, here's a link to somewhere near the conclusion of the discussion: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/167194 Matthew