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

11693 Коммитов

Автор SHA1 Сообщение Дата
akr 8f9fb1a820 * string.c (rb_str_new4): copy encoding from orig, instead of shared
one.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-09 01:04:29 +00:00
naruse 998113d62f * file.c (lchmod_internal): fix warning cast from pointer to integer of
different size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 16:10:27 +00:00
nobu 8bc75b5bb0 * lib/irb.rb (IRB::Irb::eval_input): rescues Interrupt and other than
SystemExit and SignalException.  [ruby-core:15359]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 15:44:54 +00:00
akr 185849a664 * missing/lgamma_r.c (lgamma_r): use smaller argument for sin function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 14:53:09 +00:00
akr 54b455190b * lib/open-uri.rb (OpenURI.open_http): rescue URI::InvalidURIError by
URI.parse for location URI.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 13:11:46 +00:00
nobu ef816db96f * ext/iconv/iconv.c (rb_str_derive): uses rb_str_subseq() for byte
length.  [ruby-dev:33653]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 10:22:15 +00:00
nobu 0123f3a922 * ext/iconv/iconv.c (iconv_convert): added toidx argument to set
encoding of successfully converted string.  [ruby-dev:33221]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 10:19:57 +00:00
akr d55c77f565 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 10:18:56 +00:00
nobu f3d18d8c4c * lib/mkmf.rb (xsystem): expand macros like as make.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 06:09:23 +00:00
akr 52a757686d add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 04:27:37 +00:00
naruse baa1468895 * lib/rdoc/ri/driver.rb (read_yaml): remove SM* for compatibility.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-08 00:54:21 +00:00
mame 2bef7dece1 * test/ruby/test_hash.rb: follow the change of Hash#flatten.
* test/ruby/test_time.rb: add tests to achieve over 70% test coverage
  of time.c.

* test/ruby/test_prec.rb: ditto over 90% for prec.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 15:09:12 +00:00
nobu 1809782c3e * string.c (rb_str_replace): makes frozen shared string before
sharing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 10:11:40 +00:00
nobu fb506c3000 * string.c (rb_str_dup): reverted unneeded change. [ruby-dev:33634]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 09:57:06 +00:00
akr 82b088aa0c * io.c (io_reopen): don't change access mode for stdin, stdout and
stderr.  [ruby-core:15360]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 07:40:25 +00:00
nobu 89941dffb5 * string.c (str_replace_shared): replaces string with sharing.
* string.c (rb_str_new4, rb_str_associate, rb_str_associated): allows
  associated strings shared.

* string.c (rb_str_dup, rb_str_substr, rb_str_replace): shares memory.
  [ruby-core:15400]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 07:33:50 +00:00
nobu 6c6ae98663 * string.c (rb_str_end_with): compares with the suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 06:42:44 +00:00
naruse e22ff0c9b6 * enc/trans/korean.c: add support for CP949 by Park Ji-In. [ruby-dev:33626]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 06:05:32 +00:00
nobu 9a000dda77 * missing/tgamma.c, missing/lgamma_r.c: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 02:48:21 +00:00
akr f6d8188c54 fix lgamma doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 02:40:57 +00:00
usa 4cd86dbe9f * missing/lgamma_r.c (lgamma_r): some compilers don't permit dividing
by literal 0.0. use const variable instead.

	* {bcc32,win32,wince}/Makefile.sub (MISSING): add lgamma_r.obj and
	  tgamma.obj.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 02:14:54 +00:00
akr 58f7adb50e fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 01:52:53 +00:00
akr 14373fc4db * math.c (math_gamma): new method Math.gamma.
(math_lgamma): new method Math.lgamma.

* include/ruby/missing.h (tgamma): declared unless HAVE_TGAMMA.
  (lgamma_r): declared unless HAVE_LGAMMA_R.

* configure.in (tgamma): check for replacement funtions.
  (lgamma_r): ditto.

* missing/tgamma.c: new file.  based on gamma.c from
  "C-gengo niyoru saishin algorithm jiten" (New Algorithm handbook
  in C language) (Gijyutsu hyouron sha, Tokyo, 1991)
  by Haruhiko Okumura.

* missing/lgamma_r.c: ditto.

* LEGAL (missing/tgamma.c): describe as public domain.
  (missing/lgamma_r.c): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 01:43:43 +00:00
usa b88ecbcffc * ChangeLog: date format. suppress the day of month by space instead of `0'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 00:22:16 +00:00
matz 5a8d5c873b * ext/nkf/nkf-utf8/nkf.c (nkf_enc_from_index): BINARY does not
have in-bound encoding index.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-07 00:06:55 +00:00
naruse 4f0083e45f * enc/trans/korean.c: add EUC-KR conversion support by Park Ji-In.
[ruby-dev:33621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-06 19:40:11 +00:00
matz 8c1887e3a4 typo fixed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 16:53:23 +00:00
matz acc1a53744 * hash.c (rb_hash_flatten): do not flatten recursively by default.
[ruby-dev:33603]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 16:51:30 +00:00
usa fe923029df * insns.def: sorry, remove debug code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 15:57:32 +00:00
usa ba6e0752b0 * insns.def (adjuststack): never use INC_SP with minus value because
some compilers cannot deal it collectly. use DEC_SP instead.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 15:54:33 +00:00
mame 39f0a1196b * test/ruby/test_hash.rb: add tests to achieve over 90% test coverage
of hash.c.
* test/ruby/test_env.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 15:50:25 +00:00
mame a73ec67e8d * hash.c (env_rassoc): remove access to free'd environment on mswin32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 15:25:35 +00:00
mame 03a4a0f1d2 * vm.c (rb_call_super): pass a passed block when super is called via
rb_call_super.  [ruby-dev:33598]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 12:58:50 +00:00
nobu f0cc22e990 * lib/mkmf.rb (INSTALL_DIRS, install_dirs): added BINDIR.
* lib/mkmf.rb (install_files): rejects files matching to
  $NONINSTALLFILES.

* lib/mkmf.rb (init_mkmf): defaults $NONINSTALLFILES to backup and
  temporary filse.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-05 02:14:17 +00:00
nobu 23757bce57 * lib/delegate.rb (DelegateClass): use define_method instead of
module_eval to improve performance.  [ruby-dev:33586]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 12:52:08 +00:00
nobu b00bc5f2a8 * configure.in (darwin): NSIG is not defined if _XOPEN_SOURCE > 500L.
[ruby-dev:33584]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 07:44:26 +00:00
usa b6a9ab890d * ChangeLog: remove unnecessary ``trunk/''.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 05:59:13 +00:00
nobu d739fc5a77 * trunk/parse.y (rb_enc_symname2_p): support "!", "!=" and "!~".
[ruby-dev:33592]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 05:51:21 +00:00
usa 00f34f9274 * lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extend
shouldn't be delegated. [ruby-dev:32987], etc.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 05:01:00 +00:00
matz 50f6e01b44 * lib/cgi.rb (CGI::QueryExtension::[]): no more transition
extend(CGI::Value).  a patch from <tommy AT tmtm.org> in
  [ruby-dev:33583].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-04 00:02:53 +00:00
mame 8f655cec3d * test/ruby/test_file_exhaustive.rb: add tests to achive over 80% test coverage of file.c.
* test/ruby/test_numeric.rb: forgot to add this (at r15360).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-03 12:14:30 +00:00
matz 6445ddf14a * lib/benchmark.rb (Benchmark::realtime): make Benchmark#realtime
a bit faster.  a patch from Alexander Dymo <dymo@ukrpost.ua> in
  [ruby-core:15337].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 11:09:24 +00:00
naruse 887485907e * time.c (time_cmp): Time.<=> no longer supports comparison with
numeric. [ruby-core#15332]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 08:46:05 +00:00
nobu 3940857f2b * configure.in (darwin): disabled fat-binary support which confuses
configure much, since ``universal'' implies hidden cross-compiling.
  TODO: ruby and libruby.bundle might be possible to bound with `lipo'
  after builds for each archs.  Anyway, config.h and rbconfig.rb must
  be separated definitely at least.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 00:53:41 +00:00
akr b5fdd1bd76 * random.c (limited_big_rand): fix buffer overflow when SIZEOF_BDIGITS
is 2.  fixed by Kenta Murata.  [ruby-dev:33565]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-02 00:32:40 +00:00
nobu cb355eebf0 * configure.in (darwin): ucontext on PowerPC MacOS X 10.5 is broken.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-01 12:42:40 +00:00
nobu 3fb0815d8c * configure.in (darwin): _XOPEN_SOURCE is necessary to make ucontext_t
consistent with the library implementation of MacOS X 10.5.
  [ruby-dev:33461]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-01 03:43:48 +00:00
usa 12f3bcfcab * 2008-02-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-01 02:48:33 +00:00
akr ab12f27fb5 * tool/compile_prelude.rb (C_ESC): use octal escape to avoid
"\x09for (;;) ..." to be interpret the first character 0x9f.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-01 02:45:47 +00:00
mame 9a5fd6098d * test/ruby/test_bignum.rb: suppress warnings during test.
* test/ruby/test_enum.rb: ditto.
* test/ruby/test_integer.rb: add tests to achieve over 90% test coverage of
  numeric.c.
* test/ruby/test_float.rb: ditto.
* test/ruby/test_fixnum.rb: ditto.
* test/ruby/test_numeric.rb: ditto.
* test/ruby/test_pack.rb: add tests to achieve over 90% test coverage of
  pack.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-31 14:08:14 +00:00