summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-02 08:16:30 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-02-02 08:16:30 +0000
commit63b79786250f32c0fac7a9f01eb52f8c4e6c5397 (patch)
treeae252ad5746e734e9966698f730cc7ee0bd62007 /lib
parent4f34c296da801d6c4f9464870721c8431a9f698f (diff)
* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser#get_tk): added
support of :'string' style Symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/parsers/parse_rb.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index dfca7d807a..17b87dcd1f 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1471,8 +1471,12 @@ module RDoc
if tk.kind_of?(TkSYMBEG)
set_token_position(tk.line_no, tk.char_no)
tk1 = get_tk
- if tk1.kind_of?(TkId) || tk1.kind_of?(TkOp)
- tk = Token(TkSYMBOL).set_text(":" + tk1.name)
+ if tk1.kind_of?(TkId) || tk1.kind_of?(TkOp) || tk1.kind_of?(TkSTRING)
+ if tk1.respond_to?(:name)
+ tk = Token(TkSYMBOL).set_text(":" + tk1.name)
+ else
+ tk = Token(TkSYMBOL).set_text(":" + tk1.text)
+ end
# remove the identifier we just read (we're about to
# replace it with a symbol)
@token_listeners.each do |obj|