summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-08-23* ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): to_f must underflow when ↵mrkn
the exponent is less than DBL_MIN_10_EXP - BASE_FIG. * test/bigdecimal/test_bigdecimal.rb (test_to_f): added test for the above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* ext/pathname/pathname.c (path_each_line): Pathname#each_lineakr
translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* common.mk (version.o): depends on both of version.h andnobu
include/ruby/version.h. [ruby-dev:42063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23 * backport r29071 from ruby_1_8;nahi
* ext/openssl/ossl_asn1.c (obj_to_asn1bool): fixed ASN1::Boolean encoding issue for OpenSSL 1.0.0 compatibility. ASN1::Boolean.new(false).to_der wrongly generated "\1\1\377" which means 'true'. ASN1_TYPE_set of OpenSSL <= 0.9.8 treats value 0x100 as 'false' but OpenSSL >= 1.0.0 treats it as 'true'. ruby-ossl was using 0x100 for 'false' for backward compatibility. Just use 0x0 for the case OpenSSL >= OpenSSL 0.9.7. * test/openssl/test_asn1.rb: test added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* re.c (rb_reg_search): fix: 4th argument should be regexpnaruse
object. patched by shintaro kuwamoto [ruby-dev:41667] #3459 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-23* util.c (ruby_strtod): make sure to have digit-sequence after 'p'naruse
for hexadecimal-floating-constant. [ruby-dev:42105] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-22* 2010-08-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-22 * lib/date.rb, lib/date/format.rb: [ruby-core:31695]tadf
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-22* include/ruby/ruby.h (UINT2NUM): fix ifdef condition for LLP64.akr
reported by Daniel Gutmanas. [ruby-core:31778] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* array.c (RAND_UPTO): macro for random number.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* configure.in: fix typo. a patch from Eric Wong atnobu
[ruby-core:31810]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* test/ruby/test_super.rb: add test.wanabe
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* vm.c: add missing prototype of rb_iseq_clone for r29063.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* vm.c (vm_define_method): copy iseq to avoid overwriting iseq->klass.wanabe
#2502, #3136. see #2420. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* 2010-08-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-21* ext/pathname/pathname.c (path_split): Pathname#split translated fromakr
pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-20Add rdoc about Kernel#<=> [ruby-core:31770]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-20* 2010-08-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-20* ext/pathname/pathname.c (path_expand_path): Pathname#expand_pathakr
translated from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* tool/make-snapshot (usage): mention versions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* tool/make-snapshot (usage): add usage.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* tool/make-snapshot (package): accept revision as BRANCH@REV.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* ext/socket/ancdata.c (ancillary_timestamp): fix a constant type.akr
* ext/socket/raddrinfo.c (get_afamily): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* thread_pthread.c (native_sleep): suppress a warning for platformsakr
which time_t is int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* properties.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19Forgot content of r29049.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* tool/merger.rb: Add a tool to merge commits between branches.naruse
developed by URABE Shyouhei git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19 * backport r28621 and r28632 from ruby_1_8;nahi
* ext/openssl/ossl_config.c, ext/openssl/lib/openssl/config.rb, ext/openssl/lib/openssl.rb: reimplement OpenSSL::Config in Ruby. Now it should work on windows. * test/openssl/test_config.rb: added tests for OpenSSL::Config#dup. * test/openssl/test_config.rb: added tests for Config#clone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* array.c (rb_ary_permutation, rb_ary_repeated_permutation, ↵mrkn
rb_ary_repeated_combination, rb_ary_product): use ary_make_shared_copy instead of ary_make_substitution. [ruby-dev:42067] [Bug #3708] * test/ruby/test_array.rb (test_product, test_repeated_permutation, test_repeated_combination): append assertions against [Bug #3708]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* enum.c (enum_inject): fix typo of rdoc.naruse
patched by Andrei Kulakov [ruby-core:31768] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19* ext/pathname/pathname.c (path_extname): Pathname#extname translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* 2010-08-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* vm_insnhelper.c (vm_push_frame): initialize block_iseq. a patchnobu
from Peter Weldon at [ruby-core:31757]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18forget to commit.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* array.c (ary_make_shared): revert r29037, it occurs SEGV some situations.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-18* array.c (ary_make_shared), test/ruby/test_array.rb (test_permutation): ↵mrkn
always return the original array when it is shared. [ruby-dev:42067] [Bug #3708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* 2010-08-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* regcomp.c: revert r26701; it introduces Bug #3681.naruse
[ruby-core:31677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* test/ruby/test_io.rb (test_threaded_flush): test "hi" is not outputakr
twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* lib/date.rb: Re-revert the part of r28950.naruse
It reverted the part of r28619. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* ext/pathname/pathname.c (path_dirname): Pathname#dirname translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16Tue Aug 17 07:50:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>nobu
* ext/readline/extconf.rb: check functions more. [ruby-core:31722] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16Tue Aug 17 07:42:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>nobu
* string.c (str_make_independent_expand): set capacity properly. a patch from Peter Weldon at [ruby-core:31734]. [ruby-core:31653] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16Tue Aug 17 07:38:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>nobu
* gem_prelude.rb, lib/rubygems.rb (Gem.suffixes): include empty suffix. [ruby-core:31730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* ext/pathname/pathname.c (path_basename): unused variable removed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* ext/pathname/pathname.c (path_basename): Pathname#basename translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* gc.c (gc_profile_result): Index begins with 1.nari
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* gc.c (gc_profile_result): use size_t. based on patches fromnari
Tomoaki NISHIYAMA <tomoakin@kenroku.kanazawa-u.ac.jp> at [ruby-dev:42042]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16From b80689141673b93e8d12968c3196ec6a2331da45 Mon Sep 17 00:00:00 2001nobu
From: Nobuyoshi Nakada <nobu@ruby-lang.org> Date: Mon, 16 Aug 2010 18:55:11 +0900 Subject: [PATCH 2/2] * util.c (ruby_dtoa, ruby_hdtoa): use same representations for Infinity and NaN. a part of a patch from Peter Weldon at [ruby-core:31725]. --- util.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/util.c b/util.c index 065b2f1..76ba457 100644 --- a/util.c +++ b/util.c @@ -3145,6 +3145,10 @@ freedtoa(char *s) } #endif +static const char INFSTR[] = "Infinity"; +static const char NANSTR[] = "NaN"; +static const char ZEROSTR[] = "0"; + /* dtoa for IEEE arithmetic (dmg): convert double to ASCII string. * * Inspired by "How to Print Floating-Point Numbers Accurately" by @@ -3263,9 +3267,9 @@ ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve) *decpt = 9999; #ifdef IEEE_Arith if (!word1(d) && !(word0(d) & 0xfffff)) - return rv_strdup("Infinity", rve); + return rv_strdup(INFSTR, rve); #endif - return rv_strdup("NaN", rve); + return rv_strdup(NANSTR, rve); } #endif #ifdef IBM @@ -3273,7 +3277,7 @@ ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve) #endif if (!dval(d)) { *decpt = 1; - return rv_strdup("0", rve); + return rv_strdup(ZEROSTR, rve); } #ifdef SET_INEXACT @@ -3897,8 +3901,6 @@ ruby_each_words(const char *str, void (*func)(const char*, int, void*), void *ar #define DBL_MANH_SIZE 20 #define DBL_MANL_SIZE 32 -#define INFSTR "Infinity" -#define NANSTR "NaN" #define DBL_ADJ (DBL_MAX_EXP - 2) #define SIGFIGS ((DBL_MANT_DIG + 3) / 4 + 1) #define dexp_get(u) ((int)(word0(u) >> Exp_shift) & ~Exp_msk1) @@ -3959,7 +3961,7 @@ ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, } else if (d == 0.0) { /* FP_ZERO */ *decpt = 1; - return rv_strdup("0", rve); + return rv_strdup(ZEROSTR, rve); } else if (dexp_get(u)) { /* FP_NORMAL */ *decpt = dexp_get(u) - DBL_ADJ; -- 1.7.0.4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16From 75db84d6ec7c9ef5fd05e5835ac1004df8ea7e2a Mon Sep 17 00:00:00 2001nobu
From: Nobuyoshi Nakada <nobu@ruby-lang.org> Date: Mon, 16 Aug 2010 18:50:06 +0900 Subject: [PATCH 1/2] * util.c (ruby_hdtoa): fixed buffer overrun. based on a patch from Peter Weldon at [ruby-core:31725]. --- util.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util.c b/util.c index 97b2d6c..065b2f1 100644 --- a/util.c +++ b/util.c @@ -3951,15 +3951,15 @@ ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, if (isinf(d)) { /* FP_INFINITE */ *decpt = INT_MAX; - return (nrv_alloc(INFSTR, rve, sizeof(INFSTR) - 1)); + return rv_strdup(INFSTR, rve); } else if (isnan(d)) { /* FP_NAN */ *decpt = INT_MAX; - return (nrv_alloc(NANSTR, rve, sizeof(NANSTR) - 1)); + return rv_strdup(NANSTR, rve); } else if (d == 0.0) { /* FP_ZERO */ *decpt = 1; - return (nrv_alloc("0", rve, 1)); + return rv_strdup("0", rve); } else if (dexp_get(u)) { /* FP_NORMAL */ *decpt = dexp_get(u) - DBL_ADJ; -- 1.7.0.4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e