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

16239 Коммитов

Автор SHA1 Сообщение Дата
nobu 42eeb2c1b1 * string.c (rb_str_delete_bang): should recalculate coderange.
[ruby-talk:329267]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 17:17:35 +00:00
akr 4b265d3e7b rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 17:07:38 +00:00
matz 8428347e99 * file.c (rb_file_size): new method added. [ruby-core:22088]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:45:16 +00:00
knu 400ded9338 * class.c (rb_scan_args): Allow specifying the number of trailing
mandatory arguments right after the number of optional arguments
  only if the number of leading mandatory arguments is not omitted.

* ext/socket/tcpserver.c (tcp_svr_init): Make use of it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:41:39 +00:00
matz 02316f11d5 * ext/curses/curses.c (curses_colors): new method added. a patch
from Alexander Beisig in [ruby-core:22331].

* ext/curses/curses.c (curses_color_pairs): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:19:17 +00:00
knu ca292099a6 * class.c (rb_scan_args): Revamp rb_scan_args() to compute the
number of required and optional arguments precisely to prepare
  for a more informative error message.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:15:25 +00:00
svn d91f52ae8b * 2009-02-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:02:06 +00:00
knu 0d0d5e9f71 * array.c (rb_ary_index, rb_ary_rindex): Emit a warning that a
given block is unused when an argument is specified.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 15:02:01 +00:00
akr 470103861e add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 13:19:04 +00:00
akr 0ae09794e5 * ext/socket/socket.c (sockaddr_obj): convert fe80:1::1 to fe80::1%1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 13:02:59 +00:00
akr 7e20506eae reordered.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 12:08:23 +00:00
akr 62b787b569 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 11:00:24 +00:00
akr e137e939b7 * ext/socket/ancdata.c (ancillary_timestamp): support SCM_BINTIME.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:56:57 +00:00
akr b404c651d2 * ext/socket/ancdata.c (ancillary_timestamp): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:45:46 +00:00
nobu 9632241261 * common.mk (main): split from exts and makes main program after
building exts with miniruby, to get rid of overwriting running
  program.  [ruby-core:22339]

* Makefile.in, win32/Makefile.sub (RUNCMD, MKMAIN_CMD): macros to
  run script file.

* ext/extmk.rb (parse_args): added --command-output option which
  creates script file to make main program.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 10:01:08 +00:00
nobu ff9bfed83d * common.mk (ripper.c): exec can't work on Windows.
* ext/ripper/depend (.SUFFIXES): nmake doesn't have .y by default.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 08:58:10 +00:00
nobu 11abc445dd * Makefile.in (id.h): overwrites unconditinally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 08:54:50 +00:00
nobu 5028921a25 * missing/vsnprintf.c (BSD_vfprintf): ptrdiff_t may be larger than
long.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 04:13:53 +00:00
nobu 6bdeed2b47 * signal.c (rb_disable_interrupt, rb_enable_interrupt): see
USE_TRAP_MASK.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 02:21:53 +00:00
nobu 8503451387 * process.c (rb_waitpid): last argument was missing.
* process.c (waitall_each): fixed typo.  a patch from shinichiro.h
  <shinichiro.hamaji AT gmail.com> at [ruby-dev:38054].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 01:49:39 +00:00
matz 60e8b398cd * numeric.c (flo_eq): remove unnecessary NaN check using isnan().
comparison regarding NaN is false anyway.

* numeric.c (flo_gt, flo_ge, flo_lt, flo_le, flo_eql): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 17:15:17 +00:00
mame c43236eaf7 * bootstraptest/test_thread.rb: fix for environment where fork is not
available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 16:24:46 +00:00
mame c55dd9b7d8 * thread.c (thread_cleanup_func): unlock all locked mutexes even when
forking.  [ruby-core:22269]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 16:20:06 +00:00
matz 7019187067 * insns.def (opt_minus): inline float operation.
* insns.def (opt_lt, opt_gt): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 16:12:38 +00:00
matz 0b58675868 * math.c (Need_Float): call rb_to_float() only when it is really
needed.  small performance improvement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 15:51:31 +00:00
matz e69f212933 * range.c (range_each): check #succ only when it is really
needed.  small performance improvement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 15:46:02 +00:00
svn 20f4628169 * 2009-02-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 15:20:40 +00:00
matz b47b9fbb87 * lib/pathname.rb (Pathname#foreachline): removed wrongly
resurrected method.  [ruby-dev:38065]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 15:20:35 +00:00
akr 605cd65904 * ext/socket/ancdata.c (inspect_timespec_as_abstime): new function to
show struct timespec.
  (ancillary_inspect): use it for SCM_TIMESTAMPNS on GNU/Linux.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:41:38 +00:00
akr 23e286f3fb * ext/socket/ancdata.c (inspect_bintime_as_abstime): new function to
show struct bintime.
  (ancillary_inspect): use it for SCM_BINTIME on FreeBSD.

* ext/socket/mkconstants.rb: define SCM_BINTIME.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:32:43 +00:00
akr a0e3e8e4d1 * ext/socket/ancdata.c (inspect_timeval_as_abstime): use time_t
variable to avoid a warning on environments which use long as
  tv_sec as NetBSD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 11:21:45 +00:00
knu 1a1990df71 * array.c (rb_ary_index, rb_ary_rindex): We know that argc is not
zero when we reach here.

* array.c (rb_ary_initialize, rb_ary_index): Shrink a double
  space. (NFC)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 06:54:58 +00:00
nobu bcf6fd2c86 * lib/fileutils.rb (mv): added description for the case of
different partitions.  [ruby-talk:329072]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 05:47:06 +00:00
nobu 15700ff0be * include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods,
#singleton_methods and so on return Symbols.  [ruby-talk:328775]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 01:19:43 +00:00
nobu 7e162b150d * README.EXT, README.EXT.ja: added macros for the Compatibilities.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 01:15:37 +00:00
nobu 02bfe1f6e7 typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23 01:14:26 +00:00
akr 97ef9728d5 * ext/socket/mkconstants.rb: define SO_TIMESTAMPNS and SCM_TIMESTAMPNS
if available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 18:20:11 +00:00
akr decee68028 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 18:14:01 +00:00
akr b7fe065741 * ext/socket/ancdata.c (ancillary_inspect): use SCM_TIMESTAMP instead
of SO_TIMESTAMP.  SCM_TIMESTAMP != SO_TIMESTAMP on MacOS X.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:55:52 +00:00
akr 475a350df8 * ext/socket/ancdata.c (inspect_timeval_as_abstime): new function.
(ancillary_inspect): use it for SO_TIMESTAMP.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:46:51 +00:00
akr 0c95958c2d * ext/socket/option.c (inspect_timeval_as_interval): renamed from
inspect_timeval.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:27:15 +00:00
akr cdca4e19d0 * ext/socket/option.c (inspect_timeval): fix the size test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 17:10:47 +00:00
akr e5dd6a792d rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 16:25:06 +00:00
svn 5a980f5977 * 2009-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 16:22:31 +00:00
akr 2e0a20d3e2 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 16:22:28 +00:00
akr a384273d6d rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:38:05 +00:00
nobu 83930529b2 stripped trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:26:27 +00:00
nobu 12d2c8ba41 stripped trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:23:33 +00:00
nobu 624d07b0e4 * string.c (tr_trans): should recalculate coderange.
[ruby-core:22326] (reopened at [ruby-core:22328])


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 13:42:22 +00:00
nobu 7b1bbd59e1 * test/ruby/test_string.rb (test_tr): test for [ruby-core:22328].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 13:38:24 +00:00