summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-20 03:36:43 +0000
committerdave <dave@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-20 03:36:43 +0000
commitdbd8157057cc8a8dfcc86c0d91f8f397fde41eec (patch)
treec885681b27deef0a6374ddc6e70d6499ba706757 /lib
parent791688c729764daefba88a0f34f3cdd399c39347 (diff)
downloadruby-dbd8157057cc8a8dfcc86c0d91f8f397fde41eec.tar.gz
ruby-dbd8157057cc8a8dfcc86c0d91f8f397fde41eec.tar.xz
ruby-dbd8157057cc8a8dfcc86c0d91f8f397fde41eec.zip
At Ryan Davis' suggestion, honor visibility modifers if guarded by a statement modifier
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/parsers/parse_rb.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 904475db2..ecc4455c2 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -2450,7 +2450,13 @@ module RDoc
end
skip_tkspace_comment(false)
- if peek_tk.kind_of? TkNL
+ case peek_tk
+ # Ryan Davis suggested the extension to ignore modifiers, because he
+ # often writes
+ #
+ # protected unless $TESTING
+ #
+ when TkNL, TkUNLESS_MOD, TkIF_MOD
# error("Missing argument") if singleton
container.ongoing_visibility = vis
else