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

24332 Коммитов

Автор SHA1 Сообщение Дата
drbrain 0d900cecdf * time.c (Init_Time): Improve Time documentation. Patch by Shane
Emmons.  [Ruby 1.9 - Bug #5404]
* lib/time.rb:  Improve time.rb documentation including Time.strptime.
  Patch by Shane Emmons.  [Ruby 1.9 - Bug #5402]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-06 00:14:55 +00:00
drbrain f365f19054 * random.c: Improve documentation of Random. Patch by Gregory
Parkhurst.  [Ruby 1.9 - Bug #5410]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 23:54:33 +00:00
nagachika 2e35340cf6 * ChangeLog: fix ML link.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 16:49:34 +00:00
svn c9d81ed7b3 * 2011-10-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 16:47:39 +00:00
nagachika 257d0ac80c * cont.c (cont_mark): mark original Thread object from saved_thread.
[ruby-dev:44567] [Bug #5386]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 16:47:33 +00:00
naruse 0a5ac6a448 Revert r33407; half-baked patch.
"* numeric.c (ruby_float_step): improve floating point calculations."

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 07:36:28 +00:00
naruse 6340d6336a * vm_insnhelper.c (vm_call_cfunc): remove useless hack.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 07:35:31 +00:00
naruse a635de7dcb * numeric.c (ruby_float_step): improve floating point calculations.
[ruby-core:35753] [Bug #4576]

* numeric.c (ruby_float_step): correct the error of floating point
  numbers on the excluding case.
  patched by Masahiro Tanaka [ruby-core:39608]

* numeric.c (ruby_float_step): use the end value when the current
  value is greater than or equal to the end value.
  patched by Akira Tanaka [ruby-core:39612]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-05 07:35:27 +00:00
drbrain 6f8f555d2f * hash.c (Init_Hash): Improve Hash documentation. Patch by Alvaro
Pereyra Rabanal.  [Ruby 1.9 - Bug #5405]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 20:57:07 +00:00
drbrain 9654a4c985 * random.c (Init_Random): Add a top-level comment for Random. Patch
by Brett Bim.  [Ruby 1.9 - Bug #5403]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 20:48:34 +00:00
tenderlove 137c547c3e * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
message attributes during parse failure.
* ext/psych/parser.c: Update parser to raise exception with correct
  values.
* test/psych/test_exception.rb: corresponding tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 17:53:41 +00:00
tenderlove 77e58a3398 * ext/psych/parser.c (parse): Use context_mark for indicating error
line and column.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 16:53:14 +00:00
svn fccfc4f7de * 2011-10-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 16:25:02 +00:00
tenderlove b7c66e31de * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
since postfix rescue cannot receive the exception class. Thanks
  nagachika!

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 16:24:58 +00:00
nobu 92a05ea2cf * class.c (class_alloc): allocate extra memory after containing
object setup to get rid of rare-but-potential memory leak.
* gc.c (gc_mark_children): skip marking extended members if ptr is
  NULL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 12:10:09 +00:00
naruse 0688c81a89 Revert r33397 because it cause segv.
"* class.c (class_alloc): allocate extra memory after containing"

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 09:44:08 +00:00
naruse 4eb497d90b * lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
Reported by Christopher Eberz. [ruby-core:39903] Bug #5399

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 07:37:11 +00:00
nobu bf8168cf33 * class.c (class_alloc): allocate extra memory after containing
object setup to get rid of rare-but-potential memory leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 06:04:46 +00:00
kazu e6c2da74e6 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 05:17:45 +00:00
naruse 356c7cbfb6 * gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 02:44:55 +00:00
naruse f65cdf797f Fix test of gc introduced in r33379.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-04 01:25:04 +00:00
drbrain 14f878aed6 * ext/etc/etc.c: Document Etc, Etc.sysconfdir, Etc.systmpdir. Patch
by mathew murphy.  [Ruby 1.9 - Bug #5396]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 23:33:57 +00:00
drbrain 6be866e262 * lib/shellwords.rb: Update toplevel comment with an example. Patch
by Samnang Chhun.  [Ruby 1.9 - Bug #5388]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 23:23:24 +00:00
drbrain 983476fbab * proc.c (proc_call): Update documentation to match argument handling
of proc/Proc.new/lambda/->()


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 23:16:11 +00:00
drbrain b7ea625bd6 * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.
[Ruby 1.9 - Bug #5349]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 22:59:45 +00:00
drbrain b4d3400ed6 * array.c (rb_ary_initalize): Make Array.new description match
call-seq.  Patch by Henry Maddocks.  [Ruby 1.9 - Bug #5344]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 22:43:59 +00:00
drbrain cb014763c6 * array.c (rb_ary_initialize): Add output for examples. Patch by
Jonathan Mukai.  [Ruby 1.9 - Bug #5216]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 22:35:49 +00:00
drbrain aec0f808bc * array.c (rb_ary_s_create): Add example results for Array::[]. Patch
by Jonathan Mukai.  [Ruby 1.9 - Bug #5215]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 22:31:25 +00:00
drbrain 90dfc8f99e * lib/rubygems: Update to RubyGems 1.8.11. Move Deprecate into the
Gem namespace.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 22:15:47 +00:00
tenderlove 9167328359 * ext/psych/lib/psych.rb: update psych version.
* ext/psych/psych.gemspec: generate new gemspec for new version.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 21:44:38 +00:00
tenderlove 1c60db55ac * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
* ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
  in order to avoid YAML::ENGINE switching from replacing this method.
* test/psych/helper.rb: fix tests for method name change.
* test/psych/test_document.rb: ditto
* test/psych/visitors/test_emitter.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 21:31:43 +00:00
tenderlove bd3b0d470c * ext/psych/lib/psych/scalar_scanner.rb: Match values against the
floating point spec defined in YAML to avoid erronious parses.
* test/psych/test_numeric.rb: corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 21:21:31 +00:00
tenderlove 1721fca3ad * ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
constructed with a ScalarScanner.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
  passed to the YAMLTree visitor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 21:00:50 +00:00
tenderlove bdadd49940 * ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
for 1.9.2 backwards compatibility.
* ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
  generation for 1.9.2 backwards compatibility.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 20:49:19 +00:00
svn aee487367a * 2011-10-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 15:03:04 +00:00
nagachika 3973e70d92 * gc.c (rb_gc_set_params): output GC parameter change messages only
if -w/-v options are specified. these messages are output to stderr,
  not to stdout. [ruby-core:39795] [Bug #5380]

* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-03 15:02:58 +00:00
ktsj 3e6a5b27f0 * vm.c (rb_thread_mark), cont.c (cont_mark): revert r33369 and r33371
that may cause SEGV in certain environments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 12:08:40 +00:00
ayumin 051aa44240 * test/psych/test_yamldbm.rb: add test case.
* test/syck/test_yamldbm.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 03:18:39 +00:00
tenderlove 9bb327f132 * lib/yaml/store.rb: make initialize method signature match the
superclass signature.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 02:29:27 +00:00
ktsj 02e4428ec5 * io.c: fix documentation of ARGF.lineno=.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 01:56:51 +00:00
nobu 7ee7892482 * test/mkmf/test_framework.rb: forgot to set property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 01:29:40 +00:00
nobu 5e7ff0511e * test/mkmf/test_framework.rb: test for r33372.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 01:27:00 +00:00
nobu 49cc468ad4 * lib/mkmf.rb (have_framework): try as Objective-C.
https://twitter.com/nagachika/status/120294447660539904

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-02 01:03:30 +00:00
ktsj bc07265ceb * vm.c (rb_thread_mark), cont.c (cont_mark): self pointer should not
be marked by itself. Patch by Koichi Sasada.
  [ruby-dev:44567] [Bug #5386]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-01 23:48:48 +00:00
svn a9dae87323 * 2011-10-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-01 15:47:46 +00:00
ktsj 91e190dbc2 * vm.c (rb_thread_mark): rb_thread_t needs self to be marked.
[ruby-dev:44566] [Bug #5386]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-01 15:47:42 +00:00
nagachika 3d2451d996 * gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
  [ruby-core:39777] [Bug #5380]

* test/ruby/test_gc.rb (test_gc_parameter): add test for it.

* test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
  enable pass environemnt variables to child process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-01 01:00:40 +00:00
nobu 0003d051dd * test/ruby/test_bignum.rb: use more descriptive assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-30 19:50:38 +00:00
svn 817980fb4c * 2011-10-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-30 19:50:30 +00:00
nobu f212df564a * test/ruby/test_bignum.rb (TestBignum#test_interrupt): fix for
faster CPU.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-30 19:50:25 +00:00