str = 'ID5'str.ucase # -> ID5str.upcase! # -> nil
str = 'AaA'/^#{str}$/ =~ 'AAA' # -> nil/^#{str}$/i =~ 'AAA' # -> nil (This is strange)/^#{str.upcase!}$/ =~ 'AAA' # -> nil (This is also strange)/^#{str.upcase}$/ =~ 'AAA' # -> 0
No comments:
Post a Comment