summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 d494675340..55501fd6d8 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 904475db22..ecc4455c26 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