summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--ChangeLog6
-rw-r--r--lib/rdoc/parsers/parse_rb.rb8
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d49467534..55501fd6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu May 20 12:34:39 2004 Dave Thomas <dave@pragprog.com>
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_visibility):
+ At Ryan Davis' suggestion, honor visibility modifers if guarded by a
+ statement modifier
+
Thu May 20 12:22:13 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (have_type): do not check pointer to incomplete type,
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