string.c: check null char

* string.c (rb_string_value_cstr): check null char in char, not in
  byte.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: multi-byte terminator

* string.c (rb_string_value_cstr): fill minimum length of the encoding
  as the terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: multi-byte terminator

* string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
  minimum length of the encoding as the terminator.
* string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.
* string.c (str_make_independent_expand, rb_str_modify_expand): make
  the capacity enough for multi-byte terminator.


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

* transcode.c (str_encode_associate): fill terminator after conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32/registry.rb: remove workaround

* ext/dl/win32/lib/win32/registry.rb (Win32::Registry::API#make_wstr):
  remove workaround to append WCHAR terminator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32.c: fix infinite recursion

* win32/win32.c (rb_w32_pow): undef pow to get rid of infinite
  recursive call.  re-fix [Bug #8495].  [ruby-core:55923] [Bug #8621]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_keys): set array capa to RHASH_SIZE().

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_values): set array capa to RHASH_SIZE().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_size): use RHASH_SIZE().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (recursive_hash): use RHASH_SIZE() to check hash size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* hash.c (rb_hash_reject_bang): do not call rb_hash_foreach() if RHash
  has ntbl and it is empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
encoding.c: refill terminator at associating encoding

* encoding.c (rb_enc_associate_index): refill the terminator if it
  becomes longer than before.  [ruby-dev:47500] [Bug #8624]
* string.c (str_null_char, str_fill_term): get rid of out of bound
  access.
* string.c (rb_str_fill_terminator): add a parameter for the length of
  new terminator.

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

* signal.c (ruby_signal): suppress valgrind error in
  install_sighandler().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/fiddle/win32/lib/win32/registry.rb
  (Win32::Registry::API#make_wstr): same as r41922.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/rubygems/psych_additions.rb: Ignore Psych docs here


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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bignum.c (biglsh_bang): Removed.
  (bigrsh_bang): Ditto.
  (bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.



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

* ext/win32: move from ext/dl and ext/fiddle.  since ext/extmk.rb
  builds extensions in alphabetical order, compiled?('fiddle') under
  ext/dl makes no sense.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
encoding.c: new termlen not oldtermlen

* encoding.c (rb_enc_associate_index): fill new terminator length, not
  old one.

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