From: Warren Brown Date: 2003-05-24T07:07:45+09:00 Subject: [Q] Change in 1.8 String#=~ intentional? In converting some code from Ruby version 1.6.8 to 1.8, I found that the construct: "x" =~ "[x]" has apparently changed behavior. In version 1.6.8, String#=~ will convert a String argument into a Regexp. In version 1.8, apparently this is now translated into a call to String#index. This can lead to results like: %ruby -ve "p 'x^x' =~ '^x'" ruby 1.6.8 (2002-12-24) [i386-freebsd4.7] 0 %ruby -ve "p 'x^x' =~ '^x'" ruby 1.8.0 (2003-05-01) [i386-freebsd4.7] 1 Is this change intentional? It would seem that this change would affect a lot of exsiting code in subtle, hard-to-find ways :o( - Warren Brown