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
parse.y: shared substring of source

* parse.y (lex_get_str): return shared sub-string of entire source
  string instead of a partial copy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
time.c: fix non-terminated string

* time.c (month_arg, time_strftime): RSTRING_PTR() may not be
  NUL-terminated.

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

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

* NEWS, README.EXT: fix typo.

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

* string.c (SHARABLE_SUBSTRING_P): predicate if substring can be
  shared with the original string.  true if just at the end of the
  original string, for the time being.  all substring will be able to
  be shared in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c (rb_num2long): Returns a long.
  (rb_num2ulong): Returns a unsigned long.

* bignum.c (rb_big2long): Returns a long.
  (rb_big2ulong): Returns a unsigned long.

* include/ruby/intern.h: Follow above changes.

* include/ruby/ruby.h: Follow above changes.
  (rb_num2long_inline): No need to cast.
  (rb_num2ulong_inline): Ditto.



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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h (struct RBignum): Use size_t for len.

* include/ruby/intern.h (rb_big_new): Use size_t instead of long to
  specify the size of bignum.
  (rb_big_resize): Ditto.

* bignum.c: Follow above changes.

* rational.c: Follow above changes.

* marshal.c: Follow above changes.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
parse.y: allow parenthesed do-block in cmdarg

* parse.y (primary): flush cmdarg flags inside left-paren in a
  command argument, to allow parenthesed do-block as an argument
  without arguments parentheses.  [ruby-core:61950] [Bug #9726]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: drop special case for big hash/array

* gc.c (rb_gc_writebarrier): drop special case for big hash/array
  [Bug #9518]

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
mkmf.rb: prefer $LIBPATH than $DEFLIBPATH

* lib/mkmf.rb (link_command, libpathflag, create_makefile): prefer
  user specified `$LIBPATH` than `$DEFLIBPATH`.  [ruby-core:62100]
  [ruby-trunk - Bug #9760]

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

* ext/win32ole/win32ole.c: use LONG instead of long to suppress
  incompatible pointer warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
	* st.c (st_foreach_check): chnage start point of search at check
	  from top to current. [ruby-dev:48047] [Bug #9646]


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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
gc.c: fixnum GC stress

* gc.c (garbage_collect_body): name magic numbers.

* gc.c (gc_stress_set): GC.stress accepts not only boolean but
  also Fixnum.

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