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

10785 Коммитов

Автор SHA1 Сообщение Дата
mame 181ffea5e0 * test/ruby/test_range.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:53:48 +00:00
mame 0863013b96 * test/ruby/test_string.rb: add some tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:26:31 +00:00
mame 0646c1e0d6 * ext/pty/pty.c (Init_pty): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 17:05:46 +00:00
akr 852b4629c1 * lib/open3.rb (Open3.popen3): merge hash options if given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 10:23:48 +00:00
matz 348d715eaa * lib/net/protocol.rb (Net::BufferedIO#rbuf_fill): use
read_nonblock instead of sysread wrapped by timeout to boost
  performance.  a patch from Aaron Patterson in [ruby-core:20191].
  fix #806

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02 06:34:19 +00:00
yugui 67b445f895 * set 1.9.1-p5000 into version number. [ruby-dev:36998]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-01 14:24:48 +00:00
usa 13a79948fe * signal.c (register_sigaltstack): no need to define on non-sigaltstack
platform.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-01 06:49:34 +00:00
nobu a918afe05e * cont.c (rb_fiber_start): calls with exact argument number.
[ruby-core:20088]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-01 03:00:48 +00:00
yugui 4586802dff * man/rake.1: new manual page
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30 12:42:01 +00:00
yugui 1fe2fae259 * test/ruby/test_regexp.rb (TestRegexp#test_parse_curly_brace):
now accepts quantifier on anchrs agian by r20391.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-30 09:04:51 +00:00
yugui 56d19a9e8b * man/irb.1 (EXAMPLES): new section
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29 15:00:48 +00:00
matz f7692a3373 * regparse.c (is_invalid_quantifier_target): Perl and old Ruby
accepts quantifier on anchors.  [ruby-core:20161]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29 10:55:51 +00:00
matz 23e6fc744e * ext/socket/socket.c (sock_getaddrinfo): should have updated for
Mac OS X.  a patch from Shumpei Akai in [ruby-dev:37234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29 09:30:46 +00:00
matz 776af67b28 * cont.c (fiber_alloc): separate allocation and initialization.
allow subclass to override #initialize.   [ruby-core:20086]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 15:23:09 +00:00
matz 46e431e3eb * ext/socket/socket.c (sock_s_getaddrinfo): refactored to remove
code duplication regarding getaddrinfo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 09:32:20 +00:00
keiju 3c6b1bfbe4 * ChangLog: spell miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 09:00:31 +00:00
keiju 157ed5c674 * lib/foerwardable.rb: should be usable def_single_delegator for
Class and Module.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 08:59:20 +00:00
nobu 46e3b0fe7b * iseq.c (simple_default_value): extracts simplest default
argument value.

* iseq.c (rb_iseq_parameters): returns parameter list.

* proc.c (get_proc_iseq, get_method_iseq): handles ifunc and
  bmethod.

* proc.c (rb_proc_parameters, rb_method_parameters): added
  Proc#parameters and Method#parameters.  [ruby-core:19759]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-28 04:19:37 +00:00
matz 4d3f3af836 * ext/bigdecimal/bigdecimal.c (BigDecimal_DoDivmod): bigdecimal
division (including modulo) should raise ZeroDivisionError as
  integer division. [incompatible]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 17:20:08 +00:00
matz 90add5db45 * numeric.c (flodivmod): floating point division should raise
ZeroDivisionError as integer division. [incompatible]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 16:01:54 +00:00
matz ce5063c283 * gc.c (gc_mark): still needs to check stack depth during GC.
* gc.c (stack_check): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 14:55:45 +00:00
tadf 24a6416355 * strftime.c (rb_strftime): should add padding for %%.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 12:43:05 +00:00
nobu ab9fd5dbf7 * signal.c (register_sigaltstack): stores alt stack for debug
purpose.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 07:32:56 +00:00
nobu 079505c040 * signal.c (ALT_STACK_SIZE): default minimum size is insufficient
for method calls.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 06:59:19 +00:00
matz 5337b9b5f6 * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return
Integer for #div operation.

* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should raise
  ZeroDivisionError if divisor is zero.  [ruby-dev:37207]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-27 01:43:14 +00:00
matz b0f3bd5d25 * strftime.c (STRFTIME): use rb_strftime() recursively, instead of
platform's strftime().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-26 14:30:25 +00:00
matz 0434b0f098 * ext/bigdecimal/bigdecimal.c (VpException): bigdecimal zero
division should raise FloatDomainError if mode
  VP_EXCEPTION_ZERODIVIDE is set.  [ruby-dev:37204]

* ext/bigdecimal/bigdecimal.c (BigDecimal_mode): should handle
  VP_EXCEPTION_ZERODIVIDE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-26 14:04:58 +00:00
kazu 27e3cc841c * ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-26 06:39:14 +00:00
matz 93283e7552 * ext/bigdecimal/bigdecimal.c (BigDecimal_to_r): raise exception
for nan/inf conversion.  [ruby-dev:37187] fix #793

* ext/bigdecimal/bigdecimal.c (BigDecimal_to_i): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 18:19:07 +00:00
matz a426373520 * ext/bigdecimal/bigdecimal.c (VpAlloc): avoid ALLOCA_N() to avoid
segmentation fault caused by (insanely) long decimal values.
  [ruby-dev:37189] fix #794

* ext/bigdecimal/bigdecimal.c (BigDecimal_dump, BigDecimal_to_i,
  BigDecimal_to_f, BigDecimal_to_s, BigDecimal_split,
  BigDecimal_inspect): ditto.

* ext/bigdecimal/bigdecimal.c (VpToString): small performance
  improvement.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 18:02:42 +00:00
matz 6099790621 * strftime.c (STRFTIME): should add padding for %[xXrR] etc.
[ruby-dev:37185] fix: #792

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 15:28:22 +00:00
matz 405b527276 * array.c (rb_ary_times): taint (and untrust) status should be
inherited by "ary * 0".  [ruby-dev:37024]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 14:29:39 +00:00
matz 446ea127c3 * strftime.c (rb_strftime): should not swallow incomplete
formatter, e.g. "%E".  [ruby-dev:37170] fix: #787

* strftime.c (rb_strftime): clear flags before processing unknown
  formatter, e.g. "%i".  [ruby-dev:37180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 14:24:47 +00:00
matz a689e57283 * strftime.c (rb_strftime): "%^P" should convert to upper case.
[ruby-dev:37180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 04:42:11 +00:00
matz 15b183c218 * strftime.c (FMT): use "%0d" formatter for zero padding, not "%.d".
[ruby-dev:37168]  fix: #768

* strftime.c (rb_strftime): %s to use zero padding by default.
  [ruby-dev:37180]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-25 00:24:01 +00:00
nagai 9a206a8039 * ext/tk/lib/tkextlib/blt/tabset.rb, ext/tk/lib/tkextlib/blt/tabnotebook.rb:
fix many bugs. Now, those work properly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 18:49:43 +00:00
matz 012fee9476 * numeric.c (num_step): treat infinite step specially.
[ruby-dev:37157] fix: #781.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 18:40:07 +00:00
tadf 4671724697 * lib/date/format.rb (strftime): ignores '_' flag for %[LN].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 16:26:00 +00:00
nobu 4d6d0a933e * process.c (rb_fork): stops the timer thread during fork.
[ruby-dev:37117]

* thread.c (rb_thread_start_timer_thread): timer thread needs
  system_working to be set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 15:08:24 +00:00
shugo 361a713f96 * strftime.c (rb_strftime): The # flag should work with %a, %A, %b,
%B, and %h.  [ruby-dev:37162]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:29:37 +00:00
matz 3380a05bd6 * signal.c (register_sigaltstack): should not add external
variable (with some cosmetic changes).  [ruby-dev:37158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:25:45 +00:00
shugo bf1d53e2e0 * strftime.c (rb_strftime): A width specifier for %t and %n should
work.  [ruby-dev:37160]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:01:47 +00:00
shugo aa498028b2 * strftime.c (rb_strftime): The precision of %0N should be 9.
[ruby-dev:37156]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 13:10:07 +00:00
shugo 32aed81046 * strftime.c (rb_strftime): The default precision should be 1, not
0.  [ruby-dev:37155]
* test/ruby/test_time.rb (test_strftime): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 12:42:45 +00:00
tadf 1537855833 * lib/date.rb (inspect): changed again.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 10:55:00 +00:00
matz 66041e3e23 * lib/time.rb: r20251 reverted. The patched behavior do not round
trip.  [ruby-core:19988]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 09:38:00 +00:00
yugui 0abd67ea19 * signal.c (default_handler, Init_signal): compile error if
USE_SIGALTSTACK is not defined.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-23 07:07:34 +00:00
yugui 7c9a77f880 * signal.c (ALT_STACK_SIZE): 4KB is not enough on Mac OS X.
Uses SIGSTKSZ.  this fixes [ruby-core:20040].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-23 04:17:52 +00:00
yugui ab8114f481 * test/ruby/test_method.rb (test_default_accessiblity): test case for
[ruby-dev:37124].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-22 12:34:21 +00:00
matz c5ce3ea019 * file.c (rb_file_world_writable_p): should return nil for non
world-writable files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-22 09:28:43 +00:00