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

35099 Коммитов

Автор SHA1 Сообщение Дата
tarui c94cb8b805 * 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
2014-04-20 03:58:22 +00:00
nobu 24252ff434 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
2014-04-20 00:12:15 +00:00
nobu 69ce2b7037 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
2014-04-19 23:41:36 +00:00
svn 6209b66b8c * 2014-04-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-19 21:24:49 +00:00
normal 1d2d053bda 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-19 21:24:45 +00:00
nobu c501345218 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
2014-04-19 06:38:31 +00:00
akr 95de2b0012 * 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
2014-04-19 01:11:04 +00:00
nobu 8233f969a2 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18 15:51:06 +00:00
akr a6024cdc1b * 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
2014-04-18 15:46:32 +00:00
nobu 07cad43677 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
2014-04-18 15:17:21 +00:00
nobu 398abd204d fix typo
* NEWS, README.EXT: fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18 15:11:35 +00:00
svn 47e9f5e96e * 2014-04-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18 15:09:53 +00:00
nobu c23a9376ca 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-18 15:09:49 +00:00
nobu 5b54488e78 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
2014-04-18 14:27:22 +00:00
nobu 609a6ebac5 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
2014-04-18 12:48:26 +00:00
nobu 95013cd5c0 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
2014-04-18 12:42:04 +00:00
nobu 6a8d00496a 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
2014-04-18 11:46:04 +00:00
nobu 549e0e488e 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
2014-04-18 11:46:02 +00:00
nobu 39fe6aa304 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
2014-04-18 08:27:09 +00:00
nobu 46c3749996 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
2014-04-18 08:17:44 +00:00
nobu af2228a08d 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
2014-04-18 08:00:04 +00:00
nobu 0ee6aff847 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
2014-04-18 07:55:04 +00:00
naruse fb1b9a78b7 * 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
2014-04-18 06:43:29 +00:00
naruse cbab67a1ac * 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
2014-04-18 06:43:11 +00:00
naruse c37ac7ba91 * 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
2014-04-18 06:43:08 +00:00
naruse 0ab9abe069 * 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
2014-04-18 06:42:51 +00:00
svn b97de74ee6 * 2014-04-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 23:50:24 +00:00
nobu f8d6453704 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-17 23:50:20 +00:00
nobu 2254fc650b 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
2014-04-17 08:24:15 +00:00
nobu be116626dd 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
2014-04-17 08:24:10 +00:00
hsbt 0476b87222 * 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
2014-04-17 07:31:43 +00:00
hsbt cd7aafa855 * 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
2014-04-17 06:53:05 +00:00
nobu a0209e4845 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
2014-04-17 05:23:00 +00:00
nobu 37dffb599d 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
2014-04-17 05:22:57 +00:00
nobu 3d69324be3 configure.in: FUNC_MINIMIZED
* configure.in (RUBY_FUNC_ATTRIBUTE): escape double quotes in
  attribute.

* configure.in (FUNC_MINIMIZED): attribute to minimize function
  body.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 02:41:39 +00:00
nobu 3784395b8d string.c: alias of rb_str_buf_cat and rb_str_buf_cat2
* string.c (rb_str_cat, rb_str_cat2): make aliases of
  rb_str_buf_cat and rb_str_buf_cat2 respectively.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 02:41:36 +00:00
nobu df66229230 string.c: reduce duplicated code
* string.c (rb_str_cat, rb_str_cat2): reduce duplicated code, they
  are same as rb_str_buf_cat and rb_str_buf_cat2 respectively now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 02:41:34 +00:00
svn 6239e99d2d * 2014-04-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 01:04:00 +00:00
nobu 52ca908819 fileutils.rb: [DOC] update rdoc
* lib/fileutils.rb (FileUtils#copy_entry): update rdoc about
  preserve option and permissions, following r31123.
  [ruby-core:62065] [Bug #9748]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-17 01:03:55 +00:00
nobu 118838ad3a enum.c: fix condition to recycle block argument
* enum.c (dont_recycle_block_arg): fix condition to recycle block
  argument.  lambda with rest can get internal array directly.
  [ruby-core:62060] [Bug #9749]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 14:47:38 +00:00
nobu fcbd13b10a test_enum.rb: add tests
* test/ruby/test_enum.rb (test_each_slice, test_each_cons): add
  missing tests for Enumerable#each_slice and Enumerable#each_cons.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 14:44:46 +00:00
nobu 4c98e1a2c7 * test/fileutils/test_fileutils.rb: revert r45600.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45601 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 14:30:21 +00:00
nobu a6abfa2da7 test_fileutils.rb: test :preserve option
* test/fileutils/test_fileutils.rb (test_cp_preserve_permissions):
  should test with setting :preserve option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 14:16:19 +00:00
nobu 6613580145 ruby.c: remove mangled_path
* ruby.c (rubylib_mangled_path): remove obsolete code, which has
  been disabled since 5 years ago.

* man/ruby.1 (ENVIRONMENT): delete an obsolete variable to mangle
  path, RUBYLIB_PREFIX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 08:46:31 +00:00
nobu 17eb86eb12 util.c: let getcwd allocate buffer
* util.c (ruby_getcwd): POSIX.1-2001 extends getcwd(3) as it
  allocates the buffer if the argument is NULL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 08:46:29 +00:00
nobu 9f4f9048a0 win32.c: CharNextExA with cp
* win32/win32.c (dln_find_1): use CharNextExA() instead of CharNext()
  to respect the given code page.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 02:46:53 +00:00
nobu 633def3c63 dln_find.c: PATH_SEP
* dln_find.c (dln_find_exe_r): use PATH_SEP instead of hardcoding
  separators.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 02:46:51 +00:00
nobu a39b88d2fd ossl_pkey.c: fix memory leak
* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
  finalizes only a copy of the digest context, the context must be
  cleaned up after initialization by EVP_MD_CTX_cleanup() or a
  memory leak will occur.  [ruby-core:62038] [Bug #9743]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-16 00:51:18 +00:00
svn 3f266027c5 * 2014-04-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15 16:23:11 +00:00
nobu 7d66f95523 win32.c: adjust type
* win32/win32.c (NtCmdLineElement): use long instead of int for
  rb_w32_wstr_to_mbstr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-15 16:23:07 +00:00