summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2010-08-16* ChangeLog: cleaned.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* common.mk (capi): use -b option for doxygen. It disables stdoutakr
buffering and prevents wrong reordering between stdout and stderr even when the output of "make" is redirected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16merge revision(s) 28997:shyouhei
* lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#set_error): Fix for possible cross-site scripting (CVE-2010-0541). Found by Apple, reported by Hideki Yamane. Patch by Hirokazu Nishio <nishio.hirokazu AT gmail.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* Makefile.in, win32/Makefile.sub (test-rubyspec-precheck): splitnobu
from test-rubyspec. * common.mk (test-rubyspec): moved from Makefile.in. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* 2010-08-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16* ext/bigdecimal/bigdecimal.h (llabs): never never never never neverusa
use "long long". * ext/bigdecimal.bigdecimal.c (BigDecimal_to_i): get rid of a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_inspect, VPrint, ↵mrkn
VpToString, VpVarCheck): use PRIuSIZE, PRIdSIZE, PRIdVALUE, and PRIxVALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15* lib/mkmf.rb (Logging.postpone): close @log only when it's available.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15* ext/bigdecimal/bigdecimal.h (VpVtoD): fix a type of e.mrkn
* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_inspect): fix format for size_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h (labs, llabs): ↵mrkn
support environments missing labs and llabs. * ext/bigdecimal/bigdecimal.h (vabs): added. * ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c, test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_new): replace U_LONG, S_LONG, S_INT, and U_INT with appropreate standard or ruby-provided types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* 2010-08-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* ext/pathname/pathname.c (path_utime): Pathname#utime translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* thread.c (rb_gc_mark_threads): deprecated.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* test/coverage/test_coverage.rb: added.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* ext/{coverage,objspace}/extconf.rb ($INCFLAGS): explicitly addnobu
topdir and top_srcdir. [ruby-dev:42031] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* test/objspace/test_objspace.rb: added test for objspace.nari
* ext/objspace/objspace.c: considers T_ZOMBIE by lazy sweep GC. * gc.c: considers that dsize was 0. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* configure.in, include/ruby/defines.h (RUBY_FUNC_EXPORTED): macronobu
to declare exported function. * array.c (rb_ary_memsize), string.c (rb_str_memsize), variable.c (rb_objspace_data_type_memsize): used in objspace. [ruby-dev:42022] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* io.c (rb_io_memsize): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* regcomp.c (onig_memsize): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* gc.h (rb_objspace_each_objects): used in objspace.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* vm_core.h (rb_{get,set,reset}_coverages): used in coverage.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* include/ruby/intern.h (rb_time_interval): used in io/wait.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* 2010-08-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* include/ruby/intern.h (rb_make_backtrace, rb_make_exception):nobu
used in ripper. * node.h (rb_parser_{malloc,realloc,calloc,free}): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-13* ext/pathname/pathname.c (path_truncate): Pathname#truncate translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-13* lib/test/unit.rb (MiniTest::Unit.new): extend before initialize.nobu
[ruby-dev:41970] * lib/test/unit.rb (MiniTest::Unit.autorun): use Test::Unit::Mini. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-12* ext/pathname/pathname.c (path_make_symlink): Pathname#make_symlinkakr
translated from pathname.rb. -- この行以は下無視されます -- M ChangeLog M ext/pathname/lib/pathname.rb M ext/pathname/pathname.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-12* ext/pathname/pathname.c (path_lstat): Pathname#lstat translatedakr
from pathname.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* include/ruby/encoding.h (rb_char_to_option_kcode): used innobu
ripper. * node.h (rb_reserved_word): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* ChangeLog: adjust indentation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* test/test_cmath.rb: property.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11wait a process.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* 2010-08-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* test/ruby/test_rubyoptions.rb (test_script_from_stdin): disableakr
echo. [ruby-dev:41966] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* lib/cmath.rb (CMath.sqrt): use floating-point value. [ruby-core:31672] ↵mrkn
[Bug #3678] * test/test_cmath.rb: added for testing lib/cmath.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* NEWS: merge from branches/ruby_1_9_2, and move io/console.kazu
[ruby-dev:41924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11reverted revision r28961; which breaks test-allshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11* node.h (rb_parser_{get,set}_yydebug): used in ripper.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e