From: Barun Singh Date: 2009-01-29T08:53:42+09:00 Subject: error with regular expression inside eval block I'm seeing strange behavior with Ruby 1.8 when I try to evaluate a regular expression inside an eval block. Consider the following: puts '1' =~ /^[\d]+$/ >> outputs "0" to the terminal eval %Q{'1' =~ /^[\d]+$/} >> outputs "nil" to the screen Could someone explain why the eval statement returns an incorrect result for the regexp match? Thanks... -- Posted via http://www.ruby-forum.com/.