Robert Feldt wrote:
> Hi,
> 
> I've been bitten by this discrepancy on some occasions:
> 
> irb(main):003:0> StringScanner.new("").match?(/\s*/)
> => nil
> irb(main):004:0> /\s*/ =~ ""
> => 0
> 
> Running: ruby 1.8.4 (2005-12-24) [i686-linux]
> 
> Is it a bug or a feature?! I can see arguments for both sides but for
> me it violates POLS. Opinions?

I think, if it matches /\s*/ at end of string, then it should scan it 
too; and then, #eos? would never be true (you could scan /\s*/ at the 
end infinitly).