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

34012 Коммитов

Автор SHA1 Сообщение Дата
tmm1 cc1063092b vm.c: add RubyVM.stat for accessing cache serials
* vm.c (ruby_vm_stat): add RubyVM.stat() for access to internal cache
  counters. this methods behaves like GC.stat, accepting an optional
  hash or symbol argument. [Bug #9190] [ruby-core:58750]
* test/ruby/test_rubyvm.rb: test for new method

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 04:05:59 +00:00
a_matsuda 2aa57843f2 * lib/xmlrpc/client.rb: [DOC] Fix typo
s/explicitely/explicitly/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 03:51:11 +00:00
tmm1 3dd248f13d hash.c: fix WB miss issue in Hash#replace
* hash.c (rb_hash_replace): add a write barrier to fix GC mark miss on
  hashes using Hash#replace [Bug #9226] [ruby-core:58948]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 03:03:42 +00:00
tmm1 8f77cfb308 gc.c: promote long-lived NODE_CREF objects to oldgen
* include/ruby/ruby.h: add RGENGC_WB_PROTECTED_NODE_CREF setting
  In a large app, this reduces the size of
  remembered_shady_object_count by 80%. [Bug #9225] [ruby-core:58947]
* gc.c (rb_node_newnode): add FL_WB_PROTECTED flag to NODE_CREF
* class.c (rewrite_cref_stack): insert OBJ_WRITE for NODE_CREF
* iseq.c (set_relation): ditto
* iseq.c (rb_iseq_clone): ditto
* vm_eval.c (rb_yield_refine_block): ditto
* vm_insnhelper.c (vm_cref_push): ditto
* vm_insnhelper.h (COPY_CREF): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 02:28:04 +00:00
tmm1 779ae78995 hash.c: revert r43870 and add alternative parser patch for literal keys
* hash.c (hash_aset_str): revert r43870 due to performance issue
  [Bug #9188] [ruby-core:58730]
* parse.y (assoc): convert literal string hash keys to fstrings
* test/ruby/test_hash.rb (class TestHash): expand test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:52:28 +00:00
tmm1 98a74d4dd5 parse.y: use rb_fstring() for strings stored in the symbol table
* parse.y (register_symid_str): use fstrings in symbol table
  [Bug #9171] [ruby-core:58656]
* parse.y (rb_id2str): ditto
* string.c (rb_fstring): create frozen_strings on first usage. this
  allows rb_fstring() calls from the parser (before cString is created)
* string.c (fstring_set_class_i): set klass on fstrings generated
  before cString was defined
* string.c (Init_String): convert frozen_strings table to String
  objects after boot
* ext/-test-/symbol/type.c (bug_sym_id2str): expose rb_id2str()
* test/-ext-/symbol/test_type.rb (module Test_Symbol): verify symbol
  table entries are fstrings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:39:27 +00:00
nobu 100fe2e659 class.c: fix uninitialized value
* class.c (rb_get_kwargs): fix returning uninitialized value when no
  optional keywords.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:32:07 +00:00
drbrain 12c8533e1a * lib/rubygems.rb: Update version for upcoming ruby 2.1.0 RC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:25:05 +00:00
drbrain 7ed9b794b4 * lib/rubygems: Update to RubyGems master 14749ce. This fixes bugs
handling of gem dependencies lockfiles (Gemfile.lock).

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 01:22:39 +00:00
svn 866b438c21 * 2013-12-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 00:41:09 +00:00
charliesome e0290c9404 * array.c (rb_ary_or): use RHASH_TBL_RAW instead of RHASH_TBL
* process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
  barriers where appropriate

* vm.c (kwmerge_i): use RHASH_TBL_RAW

* vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
  st_insert

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-08 00:41:01 +00:00
charliesome 0aada28159 * gc.c (gc_mark_children): use nd_clss and nd_next for code clarity
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 13:01:17 +00:00
hsbt 5728783a04 * lib/net/http/header.rb: [DOC] Net::HTTP#to_hash returns pair of key and array values. Thanks @bjhaid [fix GH-467]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:33:16 +00:00
a_matsuda 7a9f701692 * ext/tk/lib/tk/canvas.rb: [DOC] Fix typo (s/paramter/parameter/)
* ext/tk/lib/tk/text.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/component.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/tree.rb:  Ditto.
* ext/tk/lib/tkextlib/blt/treeview.rb:  Ditto.
* ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb:  Ditto.
* lib/xmlrpc/server.rb:  Ditto.

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:27:27 +00:00
hsbt 218755f306 * lib/fileutils.rb: remove unnecessary initialization. by @vipulnsward [fix GH-463]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 10:25:33 +00:00
nobu 7416073cde hash.c: rb_hash_reject without dup
* hash.c (rb_hash_reject): copy unrejected elements only to new hash,
  so that the change on the original receiver can affect.
  [ruby-core:58914] [Bug #9223]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 02:16:04 +00:00
nobu 77280b6cd6 test_struct.rb: use assert_same
* test/ruby/test_struct.rb (test_question_mark_in_member): true value
  has no meanings itself.  use assert_same instead.

* test/ruby/test_struct.rb (test_bang_mark_in_member): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 01:47:22 +00:00
nobu bc7abeb37b test_struct.rb: use assert_predicate
* test/ruby/test_struct.rb (test_question_mark_in_member): assert_true
  is a method in test-unit. use assert_predicate instead.

* test/ruby/test_struct.rb (test_bang_mark_in_member): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-07 01:44:46 +00:00
charliesome 8d6904e0a2 * ChangeLog: fix spelling of contributor's name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 23:32:04 +00:00
svn 8bd27c3817 * 2013-12-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 23:25:29 +00:00
charliesome 2e6b1d0cbb * test/ruby/test_struct.rb: Add regression test for question marks and
bangs in struct members. [Closes GH-468]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 23:25:24 +00:00
nobu 113008a7ae class.c: move kwarg functions
* class.c (rb_extract_keywords, rb_get_kwargs): move from
  vm_insnhelper.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 10:33:42 +00:00
ko1 b91e889c34 * gc.c: change oldmalloc meaning.
Increase oldmalloc_increase with malloc_increase
  instead of using obj_memsize_of().
  This change will avoid the danger of memory full without major GC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 10:27:02 +00:00
ko1 f09058b877 * gc.c (atomic_sub_nounderflow): not 0 but val itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 10:09:38 +00:00
ko1 e4720e1118 * gc.c (rb_objspace_alloc, Init_heap): initialize
oldmalloc_increase_limit at Init_heap.
  rb_objspace_alloc() is not called on some platforms.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 09:38:22 +00:00
ko1 2c616737e5 * gc.c (garbage_collect_body): bug fix.
initialize after recording.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 09:34:26 +00:00
ko1 cb62399d90 * gc.c (atomic_sub_nounderflow): added to simplify atomic sub with
care about underflow.
* gc.c (objspace_malloc_increase): use it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 08:53:47 +00:00
nobu b9cafaf524 vm_insnhelper.c: rb_get_kwargs
* vm_insnhelper.c (rb_get_kwargs): get keyword argument values from an
  option hash, not only checking keys.
* dir.c (dir_initialize): use rb_get_kwargs.
* gc.c (gc_start_internal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 08:10:47 +00:00
nobu c7572f2fe7 thread.c: compare_by_id
* thread.c (recursive_list_access): let symbol only hashes compare
  the elements by id.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 07:50:19 +00:00
nobu 378d20f80d ruby-mode.el: expand/unexpand block
* misc/ruby-mode.el (ruby-brace-to-do-end): split single line block.
* misc/ruby-mode.el (ruby-do-end-to-brace): shrink single line block
  to one line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 07:47:47 +00:00
nobu 761e9c518f gc.c: indent
* gc.c (gc_start_internal): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 07:47:29 +00:00
ko1 0e20c2afa8 * gc.c (gc_start_internal): do not use rb_gc_start() and rb_gc().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 07:22:25 +00:00
nobu b10a8c52e3 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 06:31:06 +00:00
ko1 73d6dc252d * gc.c (gc_start_internal, rb_gc): do not need
heap_pages_free_unused_pages() here.
  It was done in after_sweep().
* gc.c (rb_gc): The reason is now GPR_FLAG_CAPI.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 06:26:02 +00:00
tmm1 e6237c8243 gc.c: add note about experimental nature of new GC.start flags
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 05:32:11 +00:00
tmm1 470c9d844b gc.c: add minor marking and lazy sweeping options to GC.start
* gc.c (gc_start_internal): GC.start() now accepts two optional
  keyword arguments. These can be used to disable full_mark (minor
  mark only) or disable immediate_sweep (use lazy sweep). These new
  options are useful for benchmarking GC behavior, or performing minor
  GC out-of-band.
* test/ruby/test_gc.rb (class TestGc): tests for new options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 05:11:51 +00:00
a_matsuda c52eadeb77 * lib/webrick/httpstatus.rb: [DOC] Fix typo
s/sucess/success/
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 04:34:35 +00:00
hsbt 56654cb04d * lib/erb.rb: [DOC] fix broken link.
Use rubygems.org and www.ruby-toolbox.com instead of RAA. [Bug #9197]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 02:54:55 +00:00
hsbt 86d6d4d57c * lib/webrick/compat.rb, lib/xmlrpc/datetime.rb: [DOC] fix typo by @vipulnsward [fix GH-464]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 02:10:11 +00:00
hsbt ea1180ef80 * lib/webrick/httprequest.rb: [DOC] Fix broken link of CGI specification by @udzura [fix GH-466]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06 01:56:44 +00:00
svn 9e20546967 * 2013-12-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 16:35:05 +00:00
mrkn 2308fb170e * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec):
treat 0.0 and -0.0 of floating-point numbers specially for an optimization
  and to correctly propagate its signbit to the result.
  [Bug #9214] [ruby-core:58858]

* test/bigdecimal/test_bigdecimal.rb: add tests case for the above change.

* test/bigdecimal/test_bigdecimal_util.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 16:34:59 +00:00
nobu 8cffe06a04 test_objspace.rb: show error
* test/objspace/test_objspace.rb (test_dump_all): show error output if
  nothing dumped.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 13:30:39 +00:00
nobu 1a1c0aeb50 mkmf.rb: strip destdir from prefix
* lib/mkmf.rb (configuration): strip destdir part from prefix to get
  rid of duplication.  a patch by arton at [ruby-core:58859].
  [ruby-core:58856] [Bug #9213]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 13:18:07 +00:00
nobu efbcd1cb25 * string.c (rb_str_scrub): [DOC] add param str.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 13:05:04 +00:00
nobu 007f35ba89 strip-rdoc.rb: binmode
* tool/strip-rdoc.rb: read in binary mode to get rid of errors by
  non-ascii characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 13:02:48 +00:00
nobu 1dcc985092 fix matching
* bootstraptest/test_thread.rb: String#=~ does not accept String.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 12:59:09 +00:00
nobu 19737494b9 array.c: prefer lhs elements
* array.c (rb_ary_or): lhs elements are prefered, so should not
  replace with rhs elements.
* test/ruby/test_array.rb (test_OR_in_order): import the test failed
  by r43969 from rubyspec/core/array/union_spec.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 12:53:31 +00:00
nobu 928c99944b * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 12:49:07 +00:00
tmm1 941e36d3db gc.c: [DOC] minor typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05 12:34:39 +00:00