On 11/19/05, Mark Hubbart <discordantus / gmail.com> wrote:

> Float: NaN, Infinity, -Infinity

It's annoying that these aren't constants.

> Class: Class.new #==> #<Class:0x760fe0>

Yeah, I knew Class#inspect was full of holes for it being evalable.

> Regexp:
>   insert = '#{23}'
>     ==>"\#{23}"
>   re = /#{insert}/
>     ==>/#{23}/
>   eval(re.inspect)
>     ==>/23/
> ... where /#{23}/ is a valid regexp which matches 23 hash characters.

I think this is a bug.  These should be equivalent:

irb(main):001:0> /\#{23}/
=> /\#{23}/
irb(main):002:0> /#{'#{23}'}/
=> /#{23}/

Regexp#inspect should always escape '#'.