Skip to content

Commit

Permalink
Revert r11453
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Jan 3, 2007
1 parent 4ee717d commit 46fa18d
Show file tree
Hide file tree
Showing 23 changed files with 443 additions and 329 deletions.
23 changes: 18 additions & 5 deletions ChangeLog
@@ -1,11 +1,24 @@
Wed Jan 3 11:36:51 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
Mon Jan 1 06:13:11 2007 Eric Hodel <drbrain@segment7.net>

* io.c (ruby_dup): start GC on ENOMEM as well.
* lib/rdoc/parsers/c_parser.rb: Make Rdoc accessible. Update constant
value information.

Thu Dec 21 15:37:17 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
Mon Jan 1 06:13:11 2007 Eric Hodel <drbrain@segment7.net>

* string.c (rb_str_slice_bang): rdoc description bug fixed.
[ruby-core:09754]
* ext/bigdecimal/bigdecimal.c: Update constant comments to provide
values for RDoc.

Mon Jan 1 06:05:55 2007 Eric Hodel <drbrain@segment7.net>

* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constansts):
Allow RDoc comment to give friendly value for rb_define_const. Patch
by Daniel Berger <djberg96 at gmail.com>, [ruby-patches-7499].
* lib/rdoc/parsers/parse_c.rb (RDoc::C_Parser#handle_constansts): Fix
whitespace handling in constant comments.

Sun Dec 31 00:31:16 2006 Tadayoshi Funaba <tadf@dotrb.org>

* lib/date.rb, lib/date/format.rb: updated based on date2 4.0.

Thu Dec 14 18:29:13 2006 Yukihiro Matsumoto <matz@ruby-lang.org>

Expand Down
68 changes: 43 additions & 25 deletions ext/bigdecimal/bigdecimal.c
Expand Up @@ -1811,76 +1811,94 @@ Init_bigdecimal(void)
/* Exceptions */

/*
* Determines whether overflow, underflow or zero divide result in
* 0xff: Determines whether overflow, underflow or zero divide result in
* an exception being thrown. See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_ALL",INT2FIX(VP_EXCEPTION_ALL));

/*
* Determines what happens when the result of a computation is not a
* 0x02: Determines what happens when the result of a computation is not a
* number (NaN). See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_NaN",INT2FIX(VP_EXCEPTION_NaN));

/*
* Determines what happens when the result of a computation is infinity.
* See BigDecimal.mode.
* 0x01: Determines what happens when the result of a computation is
* infinity. See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_INFINITY",INT2FIX(VP_EXCEPTION_INFINITY));

/*
* Determines what happens when the result of a computation is an underflow
* (a result too small to be represented). See BigDecimal.mode.
* 0x04: Determines what happens when the result of a computation is an
* underflow (a result too small to be represented). See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_UNDERFLOW",INT2FIX(VP_EXCEPTION_UNDERFLOW));

/*
* Determines what happens when the result of a computation is an underflow
* (a result too large to be represented). See BigDecimal.mode.
* 0x01: Determines what happens when the result of a computation is an
* underflow (a result too large to be represented). See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_OVERFLOW",INT2FIX(VP_EXCEPTION_OVERFLOW));

/*
* Determines what happens when a division by zero is performed.
* 0x01: Determines what happens when a division by zero is performed.
* See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "EXCEPTION_ZERODIVIDE",INT2FIX(VP_EXCEPTION_ZERODIVIDE));

/*
* Determines what happens when a result must be rounded in order to
* fit in the appropriate number of significant digits. See
* 0x100: Determines what happens when a result must be rounded in order to
* fit in the appropriate number of significant digits. See
* BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "ROUND_MODE",INT2FIX(VP_ROUND_MODE));

/* Indicates that values should be rounded away from zero. See BigDecimal.mode. */
/* 1: Indicates that values should be rounded away from zero. See
* BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "ROUND_UP",INT2FIX(VP_ROUND_UP));
/* Indicates that values should be rounded towards zero. See BigDecimal.mode. */

/* 2: Indicates that values should be rounded towards zero. See
* BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "ROUND_DOWN",INT2FIX(VP_ROUND_DOWN));
/* Indicates that digits >= 5 should be rounded up, others rounded down. See BigDecimal.mode. */

/* 3: Indicates that digits >= 5 should be rounded up, others rounded down.
* See BigDecimal.mode. */
rb_define_const(rb_cBigDecimal, "ROUND_HALF_UP",INT2FIX(VP_ROUND_HALF_UP));
/* Indicates that digits >= 6 should be rounded up, others rounded down. See BigDecimal.mode. */

/* 4: Indicates that digits >= 6 should be rounded up, others rounded down.
* See BigDecimal.mode.
*/
rb_define_const(rb_cBigDecimal, "ROUND_HALF_DOWN",INT2FIX(VP_ROUND_HALF_DOWN));
/* Round towards +infinity. See BigDecimal.mode. */
/* 5: Round towards +infinity. See BigDecimal.mode. */
rb_define_const(rb_cBigDecimal, "ROUND_CEILING",INT2FIX(VP_ROUND_CEIL));
/* Round towards -infinity. See BigDecimal.mode. */

/* 6: Round towards -infinity. See BigDecimal.mode. */
rb_define_const(rb_cBigDecimal, "ROUND_FLOOR",INT2FIX(VP_ROUND_FLOOR));
/* Round towards the even neighbor. See BigDecimal.mode. */

/* 7: Round towards the even neighbor. See BigDecimal.mode. */
rb_define_const(rb_cBigDecimal, "ROUND_HALF_EVEN",INT2FIX(VP_ROUND_HALF_EVEN));

/* Indicates that a value is not a number. See BigDecimal.sign. */
/* 0: Indicates that a value is not a number. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_NaN",INT2FIX(VP_SIGN_NaN));
/* Indicates that a value is +0. See BigDecimal.sign. */

/* 1: Indicates that a value is +0. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_ZERO",INT2FIX(VP_SIGN_POSITIVE_ZERO));
/* Indicates that a value is -0. See BigDecimal.sign. */

/* -1: Indicates that a value is -0. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_ZERO",INT2FIX(VP_SIGN_NEGATIVE_ZERO));
/* Indicates that a value is positive and finite. See BigDecimal.sign. */

/* 2: Indicates that a value is positive and finite. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_FINITE",INT2FIX(VP_SIGN_POSITIVE_FINITE));
/* Indicates that a value is negative and finite. See BigDecimal.sign. */

/* -2: Indicates that a value is negative and finite. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_FINITE",INT2FIX(VP_SIGN_NEGATIVE_FINITE));
/* Indicates that a value is positive and infinite. See BigDecimal.sign. */

/* 3: Indicates that a value is positive and infinite. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_POSITIVE_INFINITE",INT2FIX(VP_SIGN_POSITIVE_INFINITE));
/* Indicates that a value is negative and infinite. See BigDecimal.sign. */

/* -3: Indicates that a value is negative and infinite. See BigDecimal.sign. */
rb_define_const(rb_cBigDecimal, "SIGN_NEGATIVE_INFINITE",INT2FIX(VP_SIGN_NEGATIVE_INFINITE));

/* instance methods */
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/extconf.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: extconf.rb,v $ -- Generator for Makefile
= $RCSfile$ -- Generator for Makefile
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/net/ftptls.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: ftptls.rb,v $ -- SSL/TLS enhancement for Net::HTTP.
= $RCSfile$ -- SSL/TLS enhancement for Net::HTTP.
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/net/telnets.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: telnets.rb,v $ -- SSL/TLS enhancement for Net::Telnet.
= $RCSfile$ -- SSL/TLS enhancement for Net::Telnet.
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: openssl.rb,v $ -- Loader for all OpenSSL C-space and Ruby-space definitions
= $RCSfile$ -- Loader for all OpenSSL C-space and Ruby-space definitions
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/bn.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: bn.rb,v $ -- Ruby-space definitions that completes C-space funcs for BN
= $RCSfile$ -- Ruby-space definitions that completes C-space funcs for BN
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/buffering.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: buffering.rb,v $ -- Buffering mix-in module.
= $RCSfile$ -- Buffering mix-in module.
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/cipher.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: cipher.rb,v $ -- Ruby-space predefined Cipher subclasses
= $RCSfile$ -- Ruby-space predefined Cipher subclasses
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/digest.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: digest.rb,v $ -- Ruby-space predefined Digest subclasses
= $RCSfile$ -- Ruby-space predefined Digest subclasses
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/ssl.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: ssl.rb,v $ -- Ruby-space definitions that completes C-space funcs for SSL
= $RCSfile$ -- Ruby-space definitions that completes C-space funcs for SSL
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/lib/openssl/x509.rb
@@ -1,5 +1,5 @@
=begin
= $RCSfile: x509.rb,v $ -- Ruby-space definitions that completes C-space funcs for X509 and subclasses
= $RCSfile$ -- Ruby-space definitions that completes C-space funcs for X509 and subclasses
= Info
'OpenSSL for Ruby 2' project
Expand Down
2 changes: 1 addition & 1 deletion io.c
Expand Up @@ -318,7 +318,7 @@ ruby_dup(orig)

fd = dup(orig);
if (fd < 0) {
if (errno == EMFILE || errno == ENFILE || errno == ENOMEM) {
if (errno == EMFILE || errno == ENFILE) {
rb_gc();
fd = dup(orig);
}
Expand Down

0 comments on commit 46fa18d

Please sign in to comment.