Граф коммитов

15035 Коммитов

Автор SHA1 Сообщение Дата
naruse ce5827c6fb * regcomp.c: revert r26701; it introduces Bug #3681.
[ruby-core:31677]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17 16:53:25 +00:00
akr 3eabe19ea9 * test/ruby/test_io.rb (test_threaded_flush): test "hi" is not output
twice.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17 11:06:22 +00:00
naruse e44f5bcbd9 * lib/date.rb: Re-revert the part of r28950.
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 06:18:53 +00:00
akr 05745ccfb3 * ext/pathname/pathname.c (path_dirname): Pathname#dirname translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17 04:02:32 +00:00
nobu 1572070fa0 Tue Aug 17 07:50:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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-16 22:50:40 +00:00
nobu 94fc95c8b0 Tue Aug 17 07:42:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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-16 22:42:46 +00:00
nobu 0afddf7b0a Tue Aug 17 07:38:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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 22:38:46 +00:00
akr adff6d4477 * ext/pathname/pathname.c (path_basename): unused variable removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 13:16:41 +00:00
akr 16cd13c051 * ext/pathname/pathname.c (path_basename): Pathname#basename translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 12:40:10 +00:00
nari 66c25e4ca1 * gc.c (gc_profile_result): Index begins with 1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 11:31:58 +00:00
nari a5207399bd * gc.c (gc_profile_result): use size_t. based on patches from
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-16 11:31:54 +00:00
nobu a043fb8642 From b80689141673b93e8d12968c3196ec6a2331da45 Mon Sep 17 00:00:00 2001
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-16 10:23:22 +00:00
nobu d17ff1a6a5 From 75db84d6ec7c9ef5fd05e5835ac1004df8ea7e2a Mon Sep 17 00:00:00 2001
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 10:22:36 +00:00
nobu 5269e14162 * ChangeLog: cleaned.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-16 10:22:33 +00:00
akr 03226ec1a6 * common.mk (capi): use -b option for doxygen. It disables stdout
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-16 08:46:53 +00:00
shyouhei 29b30b66f3 merge revision(s) 28997:
* 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 03:41:12 +00:00
nobu 966532cc40 * Makefile.in, win32/Makefile.sub (test-rubyspec-precheck): split
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 03:29:08 +00:00
usa 8eb121d812 * ext/bigdecimal/bigdecimal.h (llabs): never never never never never
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-16 01:02:23 +00:00
mrkn 56d3b926ce * ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_inspect, VPrint, 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 09:20:44 +00:00
usa 5dde183d0a * lib/mkmf.rb (Logging.postpone): close @log only when it's available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15 07:22:57 +00:00
mrkn 1148f6a327 * ext/bigdecimal/bigdecimal.h (VpVtoD): fix a type of e.
* 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-15 04:32:40 +00:00
akr b167f42ca3 fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-15 02:37:51 +00:00
mrkn d86da0fcf1 * ext/bigdecimal/extconf.rb, ext/bigdecimal/bigdecimal.h (labs, llabs): 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 15:22:43 +00:00
akr 5c55715c08 * ext/pathname/pathname.c (path_utime): Pathname#utime translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 15:16:19 +00:00
nobu f214490d90 * thread.c (rb_gc_mark_threads): deprecated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 12:04:31 +00:00
nobu 9f41782ec8 * ext/{coverage,objspace}/extconf.rb ($INCFLAGS): explicitly add
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 10:12:13 +00:00
nari e573186407 * test/objspace/test_objspace.rb: added test for objspace.
* 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 09:01:12 +00:00
nobu dccf9e0c45 * configure.in, include/ruby/defines.h (RUBY_FUNC_EXPORTED): macro
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 06:33:06 +00:00
nobu a23b1f7450 * io.c (rb_io_memsize): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 06:19:57 +00:00
nobu a979eb4548 * regcomp.c (onig_memsize): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 06:17:38 +00:00
nobu 23b1a3d3fa * gc.h (rb_objspace_each_objects): used in objspace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 06:11:03 +00:00
nobu a33fdc4ec0 * vm_core.h (rb_{get,set,reset}_coverages): used in coverage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 05:58:19 +00:00
nobu 92cb7d0ad4 * include/ruby/intern.h (rb_time_interval): used in io/wait.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14 04:23:31 +00:00
nobu 3bf1afbdd8 * include/ruby/intern.h (rb_make_backtrace, rb_make_exception):
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-14 04:20:59 +00:00
akr 87da8f0a29 * ext/pathname/pathname.c (path_truncate): Pathname#truncate translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-13 13:49:24 +00:00
nobu d7d361a316 * lib/test/unit.rb (MiniTest::Unit.new): extend before initialize.
[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-13 07:12:18 +00:00
akr 05d9fabda1 * ext/pathname/pathname.c (path_make_symlink): Pathname#make_symlink
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 14:39:46 +00:00
akr 98f53d5db2 * ext/pathname/pathname.c (path_lstat): Pathname#lstat translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-12 12:18:44 +00:00
nobu 2b1f8574c7 * include/ruby/encoding.h (rb_char_to_option_kcode): used in
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 20:58:11 +00:00
nobu 73f5b841d4 * ChangeLog: adjust indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 20:56:23 +00:00
akr 3583c42c71 * test/ruby/test_rubyoptions.rb (test_script_from_stdin): disable
echo.  [ruby-dev:41966]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 15:21:09 +00:00
mrkn 9b0b9ac237 * lib/cmath.rb (CMath.sqrt): use floating-point value. [ruby-core:31672] [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 14:30:47 +00:00
kazu c89bdea7c9 * NEWS: merge from branches/ruby_1_9_2, and move io/console.
[ruby-dev:41924]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 12:00:42 +00:00
shyouhei 988b2ae95e reverted revision r28961; which breaks test-all
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 07:04:46 +00:00
nobu 676d0641d8 * node.h (rb_parser_{get,set}_yydebug): used in ripper.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 03:18:03 +00:00
mrkn f2c65c0a33 * ext/bigdecimal/bigdecimal.c: don't use // comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-11 02:02:16 +00:00
akr e5215bfdc5 * ext/pathname/pathname.c (path_stat): Pathname#stat translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 21:19:01 +00:00
tadf bbb5a6d6f7 * complex.c (nucomp_to_[ifr]): don't allow complex with in-exact
imaginary zero to be converted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 12:20:49 +00:00
akr e6f6033b16 * lib/optparse.rb: suppress a warning.
* test/test_mutex_m.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 12:02:52 +00:00
tadf 2f8ddcd8cd * lib/date/format.rb (Date::Format::Bag): use Struct.
as an experimental.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 11:58:21 +00:00
akr 45bfb5318f * ext/pathname/pathname.c (path_rename): Pathname#rename translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 11:45:57 +00:00
usa f89a50b62c * ext/dl/win32/lib/win32/resolv.rb (get_info): get rid of a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 11:17:00 +00:00
tadf f635d1b041 [ruby-core:31658]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 10:59:17 +00:00
usa d4c63f862b * README.EXT.ja: rb_tainted_str_new_cstr() is an alias of
rb_tainted_str_new2().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 08:25:23 +00:00
mrkn 7694956ef7 * ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h, ext/bigdecimal/extconf.rb: BASE and BASE_FIG are defined based on the size of BDIGIT and renamed.
* ext/bigdecimal/bigdecimal.c, ext/bigdecimal/bigdecimal.h: use BDIGIT for Real#frac.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 06:25:27 +00:00
mrkn 678af70ce8 * ext/bigdecimal/bigdecimal.h, ext/bigdecimal/bigdecimal.c: add extern declaration of rb_cBigDecimal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 06:25:23 +00:00
naruse 6434e1e690 * lib/webrick/httprequest.rb (WEBrick::HTTPRequest::parse_uri):
rollup leading slashes. [ruby-core:31657]
  patched by Jamison Wilde
  NOTE: //authority/path is valid relative URI both RFC2396 and
  RFC3986. So when give a relative URI-like string to URI lib,
  users must care leading slashes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 05:59:11 +00:00
usa 073ac4ff5a * lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 02:29:04 +00:00
akr 8aa17733fa * ext/pathname/pathname.c (path_readlink): Pathname#readlink translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 21:27:20 +00:00
akr ec5bb26fa0 * ext/pathname/pathname.c (path_open): Pathname#open
translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 13:15:49 +00:00
akr acff965a5f * test/ruby/test_signal.rb (TestSignal#test_exit_action): use spawn
instead of fork.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 13:12:54 +00:00
naruse d1a4390eed * lib/rubygems/source_index.rb: rename unused variable.
* lib/rubygems/specification.rb: rename unused variable.

* lib/rubygems/specification.rb: remove unused variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 07:05:26 +00:00
naruse f795d0f418 * ext/nkf/nkf-utf8/nkf.c: Fix type of mimeout_state.buf.
[nkf-bug:20079]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-09 05:11:04 +00:00
nobu 8d92ac23d1 * dir.c (sys_warning_1): show error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 21:53:02 +00:00
nobu 22223dc6dd * test/ruby/test_require.rb (test_require_too_long_filename):
clear -w option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 21:51:02 +00:00
nobu a5e1a4b635 * lib/mkmf.rb ($ignore_error): initialize after $nmake.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 15:18:46 +00:00
akr 239692dde8 * ext/pathname/pathname.c (path_make_link): Pathname#make_link
translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 10:29:16 +00:00
nobu 1c8c901e3c * lib/rubygems.rb (Gem.find_files): reverted to use globbing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 07:42:51 +00:00
nobu e45d17b9d2 * lib/rubygems.rb (Gem.find_files): fixed search order same as
default behavior.

* lib/rubygems/gem_path_searcher.rb (matching_files): check if
  exist, not globbing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 07:22:07 +00:00
nobu efbad5fa48 * gem_prelude.rb, lib/rubygems.rb (Gem.suffixes): return truely
require-able suffixes only.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 07:08:55 +00:00
akr 739e022d00 * ext/pathname/pathname.c (path_ftype): Pathname#ftype translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 04:21:26 +00:00
nobu aac4f022e2 * parse.y (parser_tokadd_escape): no similar messages twice.
[ruby-core:31048]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 03:41:30 +00:00
akr 98c8e1cd91 * strftime.c (rb_strftime_with_timespec): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08 01:08:27 +00:00
nobu 288b9de79d * common.mk (RUBY_H_INCLUDES): add subst.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 23:58:57 +00:00
nobu f9845684b1 commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 23:58:53 +00:00
nobu 574cadc970 * include/ruby/missing.h, include/ruby/ruby.h (namespace ruby):
get rid of name clash on C++.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 23:55:49 +00:00
akr 5f5e0b7191 * lib/rbconfig/obsolete.rb: show the location which use Config.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 22:50:05 +00:00
akr b50fb9034e * ext/pathname/pathname.c (path_fnmatch): Pathname#fnmatch and
Pathname#fnmatch? translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 22:33:51 +00:00
akr d82dd262d0 * include/ruby/subst.h (snprintf): redefinition moved from ruby.h.
(vsnprintf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 22:19:17 +00:00
akr bb0ef922db * include/ruby/subst.h: new file for substitute standard functions..
* include/ruby/missing.h: don't substitute "close", etc. here.

* include/ruby/ruby.h: include ruby/subst.h at last.
  This prevents substituting "close" in unitstd.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 15:44:27 +00:00
akr 06efb04e8e * test/ruby/envutil.rb (EnvUtil.invoke_ruby): merge stdout and stderr
if capture_stderr is :merge_to_stdout.
  (assert_normal_exit): print abnormal output propery.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 10:53:13 +00:00
akr 2f2b6ace05 * missing/close.c: undef the macros "getpeername", "getsockname" and
"shutdown" to prevent infinite recursion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 10:05:37 +00:00
akr 3e7c24fe6e * missing/close.c: undef the macro "close" to prevent infinite
recursion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 09:38:21 +00:00
akr 49cb5a78a1 * ext/pathname/pathname.c (path_lchown): Pathname#lchown translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 09:21:37 +00:00
nobu f6404fa6d5 * include/ruby/missing.h: moved BROKEN_CLOSE replacements from
include/ruby/ruby.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 08:49:18 +00:00
nobu df96e41845 * mkconfig.rb, lib/rbconfig/obsolete.rb: warn obsolete and
deprecated Config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 08:40:32 +00:00
nobu e4e9758aa5 * ext/extmk.rb (extract_makefile): follow the change of
install-rb-default line format at r28850, which causes second
  run to create dummy makefiles.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 08:18:42 +00:00
naruse c260a0c70c * lib/mkmf.rb: change instance variable to global.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 05:19:29 +00:00
nobu a438fce7e3 * ext/pathname/pathname.c (path_sub_ext): don't clobber shared string.
[ruby-core:31640]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 04:59:27 +00:00
nobu fd0485acf7 * vm_eval.c (vm_call0): fix for VM_METHOD_TYPE_NOTIMPLEMENTED.
[ruby-dev:41953]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 04:33:33 +00:00
suke 93426cd6e8 * ext/win32ole/win32ole.c: fix checking version of GCC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 00:49:59 +00:00
akr d1893fe74d * ext/pathname/pathname.c (Init_pathname): fix number of arguments for
Pathname#chown.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 00:32:20 +00:00
akr 6bc65b35bd * test/ruby/envutil.rb (assert_normal_exit): use assert. fix
faildesc.

* test/pathname/test_pathname.rb (test_lchmod): test Pathname#lchmod
  using assert_normal_exit.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 00:29:52 +00:00
akr 261bb184c6 * ext/pathname/pathname.c (path_chown): Pathname#chown translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 23:27:28 +00:00
akr 9352485e47 * ext/pathname/pathname.c (path_lchmod): Pathname#lchmod translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 17:09:31 +00:00
akr c4c4bff456 * ext/pathname/pathname.c (path_chmod): Pathname#chmod translated from
pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 12:30:28 +00:00
nobu cba4d05785 * rational.c (nurat_div): divided by infinity should be zero.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 11:13:48 +00:00
nobu edd4332a38 * rational.c (nurat_div): divided by float zero should be
infinity.  [ruby-core:31626]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 11:12:35 +00:00
nobu 8aa6059dbf * file.c (realpath_rec): rb_str_modify depends on the length, so
resize instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 09:59:31 +00:00
nobu b4ba3ba641 * Makefile.in (clean-ext): fixed directories to be removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 09:56:22 +00:00
naruse 775188a0a2 * enc/depend: add space at the begginig of @ignore_error.
* lib/mkmf.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 08:44:33 +00:00
naruse f3372c22a6 * common.mk (clean): add prelude.c, config.log, and rbconfig.rb.
* common.mk (distclean): remove encdb.h, config.log, and rbconfig.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 08:40:30 +00:00
naruse 2b071787d2 * Makefile.in: ignore error from RMDIRS.
* enc/depend: ditto.

* lib/mkmf.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-06 08:40:27 +00:00
akr dc2676a8a0 * ext/pathname/pathname.c (path_mtime): Pathname#mtime translated from
pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 20:53:56 +00:00
akr 9bf69293e7 * ext/pathname/pathname.c (path_ctime): Pathname#ctime translated from
pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 13:09:53 +00:00
mame 5ffe59faf8 * compile.c (NODE_ARGSCAT, NODE_ARGSPUSH): drop unused ARGSCAT
results when poped is true.  [ruby-dev:41933], [Bug #3658]
  This is retry of r28870 and r28873 which were reverted.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 12:32:02 +00:00
mame fa9d53d00f * compile.c (NODE_ARGSCAT, NODE_ARGSPUSH): revert r28870 and r28873
which involuntarily changed semantics of type conversion.
  I'll re-commit a correct patch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 12:31:55 +00:00
nobu 600601c338 * compile.c (iseq_compile_each): to_a method should be called.
[Bug #3658]

* compile.c (iseq_compile_each): ditto for ARGSPUSH.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 11:30:50 +00:00
nobu 3a32ef53aa * README.EXT, README.EXT.ja (String functions): mention
rb_str_resize and rb_str_set_len.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 11:14:05 +00:00
nobu b80ddbf461 * string.c (rb_str_set_len): bail out when buffer overflowed
probably.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 11:00:18 +00:00
nobu 50b5049921 * compile.c (iseq_compile_each): drop unused ARGSCAT results.
fix [ruby-dev:41933], [Bug #3658]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 10:52:08 +00:00
nobu 5274f89201 * complex.c (nucomp_marshal_load): should check the argument.
[ruby-core:31622]

* rational.c (nurat_marshal_load): ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 09:36:16 +00:00
nobu 359d537878 * marshal.c (w_float): should not append a dot if no fractal part
exists.  [ruby-dev:41936]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 09:25:39 +00:00
matz b35f5db57e * parse.y (void_expr_gen): add 'possibly' to warning message.
[ruby-core:31611]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 08:18:32 +00:00
nobu 36992251c3 * dir.c (glob_make_pattern): fold continuous PLAINs to get rid of
snail at too deep path.  [ruby-dev:41871]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 07:57:26 +00:00
nobu 8965ed167d * string.c (rb_str_set_len): should fail to modify shared string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 07:42:47 +00:00
nobu 5425f8fe6e * ruby.c (ruby_init_loadpath_safe): ensure sopath to be modifiable
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 05:12:50 +00:00
nobu ae82480705 * string.c (str_make_independent_expand): fix buffer overflow
while shrinking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-05 03:39:19 +00:00
akr a2ebc53ec4 * file.c (realpath_rec): call rb_str_modify before rb_str_set_len.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 21:44:20 +00:00
nobu 5f13d888cf * string.c (rb_str_resize): reverted r28851. rb_str_resize cannot
work before the length is set.  [ruby-core:31615]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 11:08:28 +00:00
nobu 36044b0773 * string.c (rb_str_set_len): rb_str_modify cannot work before the
length is set, which is a precondition for rb_str_modify.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 10:37:05 +00:00
nobu 99d96a89ce * string.c (rb_str_resize): should copy the content properly. a
patch from Jeremy Evans at [ruby-core:31615].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 07:09:47 +00:00
usa c37b2ef8dc * lib/mkmf.rb (create_makefile): no need to create the directory
at each library file. this change makes making ext faster.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-04 06:52:18 +00:00
akr 88e78ac59b * ext/pathname/pathname.c (path_atime): Pathname#atime translated from
pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 21:25:43 +00:00
nobu a4c0f7dfae * random.c (Init_Random): add Random::DEFAULT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 12:16:06 +00:00
nobu b80d5f14df * hash.c (rb_check_hash_type): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 12:01:13 +00:00
nobu 292c39098d * bignum.c (rb_big_eq): never equal to infinity.
[ruby-core:31603]

* rational.c (nurat_div): hack for integral float divisor.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 11:30:19 +00:00
naruse b5dc2576cc * ext/mkext.rb: remove purelib, fixes a bug in r28440, r28441.
* spec/default.mspec: ditto.

* template/Doxyfile.tmpl: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 05:48:05 +00:00
usa 2fc40194d2 * lib/rdoc/ri/driver.rb (setup_pager): no need to check the existence
of pagers. the following code checks whether they are executable or
  not.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 05:22:51 +00:00
shyouhei 46a93a65df * tool/runruby.rb: no purelib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-03 03:05:39 +00:00
nobu 45992b4b25 * ext/purelib.rb: no longer used since the default load path of
miniruby is empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 22:52:25 +00:00
nobu a4209572de * insns.def, vm_core.h: fixed typo. reported by Rocky Bernstein
<rockyb AT rubyforge.org> at [ruby-core:31596].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 15:53:48 +00:00
nobu 1849a2baf1 * ruby.c (ruby_init_loadpath_safe): rb_str_set_len modifies ptr
since r26303.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 12:51:18 +00:00
suke d4fc0799b7 * ext/win32ole/win32ole.c: NONAMELESSUNION defined only if gcc
version is older than 3.4.4. [ruby-core:31567] [Bug #3637]
* ext/win32ole/extconf.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 12:21:00 +00:00
usa 6198f539bb * thread_win32.c (native_thread_join): need to wait thread, of course.
[ruby-dev:41911]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 07:35:35 +00:00
usa 49e259ec58 * file.c (file_expand_path): wrong condition. [ruby-core:31591]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-02 03:25:12 +00:00
akr 88431b74fc * ext/pathname/pathname.c (path_realdirpath): Pathname#realdirpath
translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 20:35:33 +00:00
akr 33d848d841 * lib/pp.rb: describe superclasses explicitly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 14:09:40 +00:00
nobu 4be5721dcb * string.c (rb_str_modify_expand, rb_str_resize): get rid of
repeating malloc and realloc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 14:04:39 +00:00
mrkn 6da48ad997 * ChangeLog: forget to write annotation for redmine.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 13:24:01 +00:00
mrkn 98685cc70f * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): use rb_memhash and take care of negative finite numbers properly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 13:20:22 +00:00
akr c29b801afa * ext/pathname/pathname.c (path_realpath): Pathname#realpath translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 11:57:58 +00:00
nobu b496cd64e5 * win32/Makefile.sub: needs stddef.h for size_t. a patch from
Akio Tajima at [ruby-dev:41905].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 08:27:34 +00:00
akr caa05197d3 * ext/pathname/pathname.c (path_sub_ext): Pathname#sub_ext translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 05:59:49 +00:00
mame ffe49186c9 * lib/irb/init.rb (IRB.parse_opts): set VERBOSE to true when debug
switch called in irb.  a patch from Andrew Grimm in
  [ruby-core:31558].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 01:48:57 +00:00
mame 6ad3f61663 * bignum.c (big_op): comparison of bignum and infinity has returned 1
or -1, but it must return boolean.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 01:12:54 +00:00
akr b6f174afdb add ML ref.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 00:50:28 +00:00
akr a35c3cf341 * class.c (rb_include_module): don't clear the method cache if the
included module has no method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 00:46:18 +00:00
akr 572b8b3749 * ext/pathname/pathname.c (path_sub): Pathname#sub translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 00:22:18 +00:00
nobu 933e5e0911 * include/ruby/win32.h: latest x86_64 mingw defines stati64.
[ruby-core:27516]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-01 00:12:51 +00:00
suke e8f2d9e808 * ext/win32ole/win32ole.c: fix typo. [ruby-core:31564][Bug #3636]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-31 23:54:49 +00:00
akr b6ebd0622c * ext/pathname/pathname.c (path_inspect): Pathname#inspect translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-31 14:16:10 +00:00
akr 9006bd2015 * ext/pathname/pathname.c (Init_pathname): The alias,
Pathname#to_path, is translated from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-31 07:21:42 +00:00
akr c57e8f7ddc * ext/pathname/pathname.c (path_to_s): Pathname#to_s translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-31 00:13:10 +00:00
nahi d61f475bb1 * lib/webrick/ssl.rb (WEBrick::Utils.create_self_signed_cert):
merged r28784 from ruby_1_8: wrongly created dummy SSL certificate 
          with version == 3 (no such version) and serial == 0 (must be >0). 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 23:26:53 +00:00
akr be2f3c58e6 * ext/pathname/pathname.c (path_hash): Pathname#hash translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 12:44:41 +00:00
nobu 63a555ee4e * lib/net/imap.rb (example): use IO#noecho to read password if
possible, and defer until needed.  [ruby-dev:41889]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 03:42:05 +00:00
nobu 2d8228c28e * lib/net/imap.rb (example): support starttls option.
[ruby-dev:41888]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-30 03:38:26 +00:00
nobu 6d56e80ad1 * file.c (file_expand_path): home directory must be absolute.
[ruby-core:31537]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 23:51:53 +00:00
nobu a99de84663 * file.c (file_expand_path): should check if could find user.
[ruby-core:31538]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 23:33:21 +00:00
nobu 7ae7ac4aba * util.c (ruby_add_suffix): fixed a bug returning uninitialized
value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 22:59:54 +00:00
nagai bc8e650735 * ext/tk/extconf.rb: use TK_XINCLUDES on tkConfig.sh when not empty,
even if MacOS X Aqua version [ruby-dev:41883].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 22:54:01 +00:00
akr 3608baa990 * ext/pathname/pathname.c (path_cmp): Pathname#<=> translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-29 13:29:20 +00:00
nobu 8d228b2579 * common.mk (EXT_SRCS): add ext/json/parser/parser.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 21:51:31 +00:00
nobu b67ecc80df * file.c (rb_file_s_basename): pass baselen to rmext.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 20:52:16 +00:00
naruse de06330e8b * configure.in: not [freebsd] but [freebsd*] for AS_CASE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 17:38:56 +00:00
akr 7996581a82 * ext/pathname/pathname.c (path_eq): Pathname#{==,===,eql?} translated
from pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 13:24:55 +00:00
usa 97bc1a122b * win32/Makefile.sub (config.h): VC6 or later have stddef.h.
* include/ruby/missing.h: need to include stddef.h for size_t.

* include/ruby/missing.h: shouldn't declare as dllimport when building
  ruby itself (for Windows).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 10:39:33 +00:00
nobu 51b6bfb011 * missing/*.c: include missing.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 08:12:01 +00:00
usa e53a60147b * cont.c: typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 00:38:21 +00:00
naruse 392ab9d05e * cont.c: (RB_PAGE_SIZE): renamed from PAGE_SIZE. [ruby-dev:41870]
* cont.c: (RB_PAGE_MASK): renamed from PAGE_MASK.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-28 00:25:53 +00:00
akr 0cb17010c4 * ext/pathname/pathname.c (path_taint): use rb_obj_taint.
(path_untaint): Pathname#untaint translated from
  pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 14:14:14 +00:00
nobu 444b943e35 * lib/mkmf.rb (have_framework): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 09:59:29 +00:00
nobu 58f1d31a1d * defines.h, intern.h, missing.h, ruby.h, st.h, util.h: include
config.h and defines.h for autoconf macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 09:33:55 +00:00
usa 592d885caa * numeric.c (flo_cmp): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 07:27:48 +00:00
naruse 7175a9073e * class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:
clean unused-value warnings.

* cont.c, process.c, vm_exec.h: clean cast warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 07:13:43 +00:00
akr aa4f1d8e81 * ext/pathname/pathname.c (path_taint): Pathname#taint translated from
pathname.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 13:35:18 +00:00
nobu 195a7da4ec * configure.in (config.h): add include guard.
* win32/Makefile.sub, bcc32/Makefile.sub (config.h): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 09:18:21 +00:00
nobu 8e9a9cf0ec * configure.in (XCFLAGS): missing.h needs config.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 05:38:23 +00:00
usa 705586b1a1 * include/ruby/missing.h: revert a part of r28727. config.h is expected
to include only once, before including defines.h.
  including it here breaks some macro definitions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 05:10:25 +00:00
naruse c6cda4e336 * configure.in: define BROKEN_CLOSE only on FreeBSD.
This needs to merge to 1.9.2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 04:53:06 +00:00
nobu af4986f515 * vm.c (rb_thread_mark): should mark iseq itself other than normal
iseq.  [ruby-dev:41880]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 04:01:38 +00:00
naruse 201d99cc5f * configure.in: define BROKEN_CLOSE on FreeBSD.
This fixes build failure on MSVC. [ruby-core:31481]

* include/ruby/ruby.h, include/ruby/missing.h:
  use BROKEN_CLOSE for replacing close(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 03:05:25 +00:00
nobu 7d2ed51843 * vm.c (rb_thread_mark): mark only self of normal iseqs, not
nodes.  [ruby-dev:41874]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-26 00:51:33 +00:00
nobu 7bfa1146e2 * numeric.c (flo_cmp): honor the result of infinite? method of the
other.  [ruby-core:31470]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-24 20:37:31 +00:00
nobu 8d3bb806b0 * test/ruby/envutil.rb (EnvUtil#.suppress_warning): added.
* test/ruby/test_float.rb (TestFloat#test_Float): suppress
  warnings under --verbose.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-24 20:26:34 +00:00
shugo 8621d0908a * lib/mutex_m.rb (sleep): added Mutex_m#sleep to support ConditionVariable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 07:14:54 +00:00
nobu 38c4242cf6 * configure.in (RUBY_MINGW32): ignore msvc suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 06:09:22 +00:00
nobu b4080cf9ea * configure.in (RUBY_TRY_CFLAGS): try with werror turned on.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 06:05:43 +00:00
nobu 8044ac7b43 * re.c (rb_reg_expr_str): fixed out-of-boundary access at invalid
multibyte characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 00:02:51 +00:00
nobu 85bf9bede4 * configure.in (XCFLAGS): reverted mistakenly removed option.
[ruby-dev:41872]

* include/ruby/missing.h: needs ruby/config.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-23 00:00:12 +00:00
matz 95c6a8a3b7 * complex.c (nucomp_to_i): allow complex with imaginary zero to be
converted.

* complex.c (nucomp_to_f, nucomp_to_r): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 23:48:13 +00:00
nobu 1b1041f847 * configure.in (RUBY_EXTERN): unnecessary after all.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 11:59:03 +00:00
mame 6e7f56fdc7 * thread_pthread.c (get_stack): fix memory leak; pthread_attr_destory
must be called even when pthread_getattr_np is used.
  [ruby-core:31269]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 11:15:16 +00:00
naruse 203ebcbb92 * re.c (rb_reg_expr_str): fix broken Regexp#inspect when it
is ASCII-8BIT and non-ASCII character.
  The length of character should be from original byte string.
  [ruby-core:31431]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 07:29:32 +00:00
naruse 24b17a2e87 * include/ruby/missing.h: add prototype for ruby_close().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 05:41:54 +00:00
nobu d5a1efdc61 * configure.in (RUBY_EXTERN): ignore invalid attribute.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 03:58:18 +00:00
nobu cc703f2d56 * configure.in: fix for older autoconf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 03:30:59 +00:00
nobu 062b4d6752 * include/ruby/{intern,io}.h: add missing prototypes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 03:02:40 +00:00
nobu 0bd71ff354 * configure.in (XCFLAGS): use -fvisibility=hidden if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-21 21:38:25 +00:00