string.c: rb_str_cat_cstr

* string.c (rb_str_cat): make non-buf version main.

* string.c (rb_str_cat_cstr): rename from rb_str_cat2.

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

* string.c (rb_str_cat_cstr): check the argument as other `_cstr`
  functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* template/opt_sc.inc.tmpl: [DOC] Fix typo in comment by @imasahiro [ci skip][fix GH-595]
* template/optinsn.inc.tmpl: ditto.
* template/optunifs.inc.tmpl: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prelude.rb: [DOC] Update Thread::exclusive docs by @stevenharman.
  [ci skip][fix GH-589]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: suppress a warning

* gc.c (get_envparam_size): suppress a warning by char-subscripts.

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

* ruby.c (push_include_cygwin): drop older cygwin support.

* ruby.c (ruby_init_loadpath_safe): ditto, and always use String as
  libpath buffer on Windows.

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

* configure.in (rb_cv_getcwd_malloc): check if getcwd allocates
  buffer if NULL is given [ruby-core:62072] [Bug #9752]

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (enc_strlen): move UTF-8 optimization from str_strlen to
  enc_strlen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (str_strlen): use enc_strlen if the coderange is known.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: check str_strlen's argument, and add comment or
  use NULL if simply it uses str's enc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: use uintptr_t instead of VALUE because they are not ruby
  object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: keep code range

* string.c (str_buf_cat): keep code range if possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: don't clear coderange at expanding

* string.c (rb_str_modify_expand): like as str_modify_keep_cr,
  don't clear coderange unless broken.

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

* string.c (str_buf_cat): revert r45621.  this function does not
  scan appended data.

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

* string.c (str_buf_cat): revert r45622.  broken data can be added
  later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
zlib.c: return unshared string

* ext/zlib/zlib.c (zstream_shift_buffer): create new copied string
  since it cannot be shared ever.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ossl_x509name.c: null-terminate field name

* ext/openssl/ossl_x509name.c (ossl_x509name_add_entry): field
  name of X509_NAME_add_entry_by_txt() must be NULL-terminated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
README.EXT: about string termination

* README.EXT (Appendix B): add RSTRING_PTR and RSTRING_LEN.
  and NULL-termination by StringValueCStr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
string.c: share middle of a string

* string.c (rb_str_new_frozen): consider the shared string at
  middle.
* string.c (rb_str_subseq, rb_str_substr, str_byte_substr): share
  middle of a string.

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