Bug #5136

:"!".inspect の結果が1.9.3devと1.9.2とでは異なる

Added by Ayumu AIZAWA over 2 years ago. Updated over 2 years ago.

[ruby-dev:44314]
Status:Closed
Priority:Normal
Assignee:-
Category:-
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-08-01 revision 32798) [x86_64-darwin10.8.0] Backport:

Description

=begin
(({:"!".inspect})) とか (({:!.inspect})) の結果が1.9.3devと1.9.2 では異なるようです。

$ bin/ruby -v -e 'puts :!.inspect'
ruby 1.9.3dev (2011-08-01 revision 32798) [x8664-darwin10.8.0]
:"!"
$ ruby -v -e 'puts :"!".inspect'
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86
64-darwin10.6.0]
:!
$ bin/ruby -v -e 'puts :!.inspect'
ruby 1.9.3dev (2011-08-01 revision 32798) [x8664-darwin10.8.0]
:"!"
$ ruby -v -e 'puts :!.inspect'
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86
64-darwin10.6.0]
:!

ちなみに 1.8.7 では以下の通り、前者は1.9.3devと同じ出力で、後者はSyntaxError となります。
$ ruby -v -e 'puts :"!".inspect'
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0]
:"!"
$ ruby -v -e 'puts :!.inspect'
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0]
-e:1: syntax error, unexpected '!', expecting tSTRINGCONTENT or tSTRINGDBEG or tSTRINGDVAR or tSTRINGEND
puts :!.inspect
^

=end

Associated revisions

Revision 32809
Added by Nobuyoshi Nakada over 2 years ago

  • parse.y (rbencsymname2_p): :! is valid symbol. [Bug #5136]

History

#1 Updated by Nobuyoshi Nakada over 2 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r32809.
Ayumu, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • parse.y (rbencsymname2_p): :! is valid symbol. [Bug #5136]

Also available in: Atom PDF