summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--eval.c5
-rw-r--r--ext/.document4
-rw-r--r--ext/digest/digest.c34
-rw-r--r--ext/io/wait/wait.c33
-rw-r--r--lib/rdoc/parsers/parse_c.rb4
-rw-r--r--lib/rdoc/parsers/parse_rb.rb2
-rw-r--r--parse.y2
8 files changed, 46 insertions, 39 deletions
diff --git a/ChangeLog b/ChangeLog
index dd9b91a22..0416259e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -262,6 +262,7 @@ Fri Aug 4 12:13:22 2006 Eric Hodel <drbrain@segment7.net>
* lib/.document: Include most of the standard library in RDoc
generation.
* lib/rdoc/ri/ri_formatter.rb: Don't unescape HTML in HtmlFormatter.
+ Submitted by <ksruby at gmail.com>. [ruby-core:08392].
* lib/drb/ssl.rb: Close socket on SSLError [ruby-core:7197]
Fri Aug 4 18:59:49 2006 Keiju Ishitsuka <keiju@ruby-lang.org>
diff --git a/eval.c b/eval.c
index 8ebfbe93b..0c10daf0b 100644
--- a/eval.c
+++ b/eval.c
@@ -2877,9 +2877,10 @@ rb_eval(VALUE self, NODE *n)
case NODE_CASE:
{
- VALUE val;
+ VALUE val = Qundef;
- val = rb_eval(self, node->nd_head);
+ if (node->nd_head)
+ val = rb_eval(self, node->nd_head);
node = node->nd_body;
while (node) {
if (nd_type(node) != NODE_WHEN) {
diff --git a/ext/.document b/ext/.document
index 0985f4532..45702f27a 100644
--- a/ext/.document
+++ b/ext/.document
@@ -1,6 +1,10 @@
# Add files to this as they become documented
+bigdecimal/bigdecimal.c
+etc/etc.c
+fcntl/fcntl.c
iconv/iconv.c
+io/wait/wait.c
nkf/lib/kconv.rb
nkf/nkf.c
socket/socket.c
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index a11996e5e..347e3c71c 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -13,24 +13,6 @@
************************************************/
-/*
- * This module provides an interface to the following hash algorithms:
- *
- * - the MD5 Message-Digest Algorithm by the RSA Data Security,
- * Inc., described in RFC 1321
- *
- * - the SHA-1 Secure Hash Algorithm by NIST (the US' National
- * Institute of Standards and Technology), described in FIPS PUB
- * 180-1.
- *
- * - the SHA-256/384/512 Secure Hash Algorithm by NIST (the US'
- * National Institute of Standards and Technology), described in
- * FIPS PUB 180-2.
- *
- * - the RIPEMD-160 cryptographic hash function, designed by Hans
- * Dobbertin, Antoon Bosselaers, and Bart Preneel.
- */
-
#include "digest.h"
static VALUE mDigest, cDigest_Base;
@@ -244,7 +226,21 @@ rb_digest_base_equal(VALUE self, VALUE other)
}
/*
- * Init
+ * This module provides an interface to the following hash algorithms:
+ *
+ * - the MD5 Message-Digest Algorithm by the RSA Data Security,
+ * Inc., described in RFC 1321
+ *
+ * - the SHA-1 Secure Hash Algorithm by NIST (the US' National
+ * Institute of Standards and Technology), described in FIPS PUB
+ * 180-1.
+ *
+ * - the SHA-256/384/512 Secure Hash Algorithm by NIST (the US'
+ * National Institute of Standards and Technology), described in
+ * FIPS PUB 180-2.
+ *
+ * - the RIPEMD-160 cryptographic hash function, designed by Hans
+ * Dobbertin, Antoon Bosselaers, and Bart Preneel.
*/
void
diff --git a/ext/io/wait/wait.c b/ext/io/wait/wait.c
index 4b95698ce..68d4bd5af 100644
--- a/ext/io/wait/wait.c
+++ b/ext/io/wait/wait.c
@@ -41,17 +41,13 @@ void Init_wait _((void));
EXTERN struct timeval rb_time_interval _((VALUE time));
/*
-=begin
-= IO wait methods.
-=end
+ * call-seq:
+ *
+ * io.ready? -> boolean
+ *
+ * Returns non-nil if input available without blocking, or nil.
*/
-/*
-=begin
---- IO#ready?
- returns non-nil if input available without blocking, or nil.
-=end
-*/
static VALUE
io_ready_p(VALUE io)
{
@@ -84,12 +80,15 @@ wait_readable(VALUE p)
#endif
/*
-=begin
---- IO#wait([timeout])
- waits until input available or timed out and returns self, or nil
- when EOF reached.
-=end
-*/
+ * call-seq:
+ *
+ * io.wait -> io, true, false or nil
+ * io.wait(timeout) -> io, true, false or nil
+ *
+ * Waits until input is available or times out and returns self or nil when
+ * EOF is reached.
+ */
+
static VALUE
io_wait(int argc, VALUE *argv, VALUE io)
{
@@ -130,6 +129,10 @@ io_wait(int argc, VALUE *argv, VALUE io)
return Qnil;
}
+/*
+ * IO wait methods
+ */
+
void
Init_wait()
{
diff --git a/lib/rdoc/parsers/parse_c.rb b/lib/rdoc/parsers/parse_c.rb
index f04d37cb9..3185da771 100644
--- a/lib/rdoc/parsers/parse_c.rb
+++ b/lib/rdoc/parsers/parse_c.rb
@@ -169,6 +169,7 @@ module RDoc
extend ParserFactory
parse_files_matching(/\.(c|cc|cpp|CC)$/)
+ @@enclosure_classes = {}
@@known_bodies = {}
# prepare to parse a C file
@@ -230,7 +231,7 @@ module RDoc
parent_name = @known_classes[parent] || parent
if in_module
- enclosure = @classes[in_module]
+ enclosure = @classes[in_module] || @@enclosure_classes[in_module]
unless enclosure
if enclosure = @known_classes[in_module]
handle_class_module(in_module, (/^rb_m/ =~ in_module ? "module" : "class"),
@@ -258,6 +259,7 @@ module RDoc
find_class_comment(cm.full_name, cm)
@classes[var_name] = cm
+ @@enclosure_classes[var_name] = cm
@known_classes[var_name] = cm.full_name
end
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 0186b023a..8fe9da6ae 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1488,7 +1488,7 @@ module RDoc
obj.pop_token
end if @token_listeners
else
- warn("':' not followed by identified or operator")
+ warn("':' not followed by identifier or operator")
tk = tk1
end
end
diff --git a/parse.y b/parse.y
index 7139ee6b4..8768ef9c8 100644
--- a/parse.y
+++ b/parse.y
@@ -2605,7 +2605,7 @@ primary : literal
| keyword_case opt_terms case_body keyword_end
{
/*%%%*/
- $$ = $3;
+ $$ = NEW_CASE(NULL, $3);
/*%
$$ = dispatch2(case, Qnil, $3);
%*/