string.c (Init_frozen_strings): use st_init_table_with_size

All symbols have an fstring entry, and we initialize symbol tables
with 1000 bins.  This reduces resizes during startup.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gems/bundled_gems: Upgraded to test-unit-3.0.1 and minitest-5.4.1

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/ruby.h: move comments

* include/ruby/ruby.h (enum ruby_special_consts): move bit pattern
  comments side-by-side.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm_method.c: should not modify frozen objects

* vm_method.c (rb_method_entry_make, remove_method): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm.c (env_alloc): inline to avoid extra zeroing

tiny speedup [ruby-core:64980]

benchmark results:
Execution time (sec)
name    trunk   built
app_lc_fizzbuzz 100.411 98.692

Speedup ratio: compare with the result of `trunk' (greater is better)
name    built
app_lc_fizzbuzz 1.017

rb_proc_alloc changes will give more

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix typos and indent [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
fix a typo [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
readline.c: use rb_setup_fake_str

* ext/readline/readline.c (readline_s_delete_text): initialize a
  fake string by rb_setup_fake_str().

* internal.h (rb_setup_fake_str): allow extensions to call.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
follow RIncGC

* .gdbinit (rp), debug.c (RUBY_FL_PROMOTED): follow RIncGC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/ruby.h: freeze singleton class

* include/ruby/ruby.h (rb_obj_freeze_inline): propagate freezing
  to the singleton class if it is existing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
set svn:ignore


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/Setup.nacl: remove trainling space.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2014-09-13

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Process.detach: avoid singleton class creation

* process.c (Init_process): subclass Thread as Process::Waiter
  (rb_detach_process): use Process::Waiter instead of singleton class

* test/ruby/test_process.rb (test_process_detach): new test

* inits.c (rb_call_inits): call Init_Thread before Init_process to
  ensure Process::Waiter may be a subclass of Thread

Thanks to headius for reporting [Bug #10231]
Thanks to nobu for review of my initial patch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc.c (rb_proc_alloc): inline and move to vm.c

* proc.c (rb_proc_alloc): inline and move to vm.c
  (rb_proc_wrap): new wrapper function used by rb_proc_alloc
  (proc_dup): simplify alloc + copy + wrap operation
  [ruby-core:64994]

* vm.c (rb_proc_alloc): new inline function
  (rb_vm_make_proc): call rb_proc_alloc

* vm_core.h: remove rb_proc_alloc, add rb_proc_wrap

* benchmark/bm_vm2_newlambda.rb: short test to show difference

First we allocate and populate an rb_proc_t struct inline to avoid
unnecessary zeroing of the large struct.  Inlining speeds up callers as
this takes many parameters to ensure correctness.  We then call the new
rb_proc_wrap function to create the object.

rb_proc_wrap - wraps a rb_proc_t pointer as a Ruby object, but
we only use it inside rb_proc_alloc.  We must call this before
the compiler may clobber VALUE parameters passed to rb_proc_alloc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
proc/env DATA_PTR is never NULL

* proc.c (proc_free): remove, use RUBY_TYPED_DEFAULT_FREE
  (proc_mark, proc_memsize): remove needless branching

* vm.c (env_free): remove, use RUBY_TYPED_DEFAULT_FREE
  (env_mark, env_memsize): remove needless branching

This shows a tiny ~0.5% improvement in benchmark/bm_vm2_newlambda.rb
but also removes a lot of code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vm.c (thread_alloc): remove needless volatile

If we needed a volatile there, every other alloc function would need it.
There is nothing special I can see about thread_alloc which would
justify it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_yield.rb: use temporary instance

* test/ruby/test_yield.rb (test_with_enum): use temporary
  instance, do not define a method on the global class object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
man/ruby.1: use https for *.ruby-lang.org links

Avoid redirects which may be MitM-ed and slow.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e