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

25761 Коммитов

Автор SHA1 Сообщение Дата
naruse 73a184cc3a * string.c (tr_setup_table): fix multiple non latin argument for
non latin (over 256 characters) tr-like methods.
  [ruby-core:43371] [Bug #6167]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-25 09:20:04 +00:00
shugo 0c9f66eb40 * enumerator (lazy_initialize): set the instance variable "receiver"
to include the receiver to the return value of inspect on a lazy
  enumerator directly created by Enumerator::Lazy.new.

* enumerator (RETURN_LAZY): don't set the instance variable "receiver".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-24 15:53:38 +00:00
svn fa288063e0 * 2012-03-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-24 15:17:36 +00:00
shugo 6b885f6e74 * enumerator (enumerator_inspect): include the original receiver and
method name of Enumerator::Lazy in the result of inspect.
  [ruby-core:43345] [Bug #6159]

* enumerator (InitVM_Enumerator): don't use rb_define_alias for
  some methods such as collect in order to make rb_frame_this_func()
  return the correct method names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-24 15:17:31 +00:00
svn 576a69a564 * 2012-03-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-24 13:22:28 +00:00
nobu 28e48d3fd8 * time.c (time_init_1): Time.new will accept seconds as string or
int.  [ruby-core:43569][Bug #6193]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-24 13:22:22 +00:00
duerst 463633e4a9 transcode.c (documentation for str_encode): Explain
that transcoding to the same encoding is a no-op
  (i.e. no exceptions, no replacements,...).
  [ruby-core:43557][Bug #6190]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 06:12:02 +00:00
nobu 163ab0a4da * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
well as String#hex and String#oct.  [ruby-core:43566][Bug #6192]
* string.c (rb_must_asciicompat): check if ASCII compatible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 04:19:24 +00:00
nobu a13486997a * test/ruby/test_io.rb (try_fdopen): more GCable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 03:14:49 +00:00
nobu 2bf3b20dbe * file.c (rb_file_s_basename): rb_enc_asciicompat() evaluates the argument multiple times.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 03:04:20 +00:00
naruse ee3e7dcf68 Refix Bug #6094: use unsigned long integer literal.
* ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
  [Bug #6094]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 02:33:05 +00:00
naruse cca049e0d0 Revert "* ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type."
This reverts commit r35102.
It breaks tests on FreeBSD.

  6) Failure:
test_new_with_exponent(OpenSSL::TestPKeyRSA)
[/usr/home/chkbuild/build/ruby-trunk/20120323T010301Z/ruby/test/openssl/test_pkey_rsa.rb:59]:
<3> expected but was
<12884901891>.

  7) Failure:
test_new_exponent_default(OpenSSL::TestPKeyRSA)
[/usr/home/chkbuild/build/ruby-trunk/20120323T010301Z/ruby/test/openssl/test_pkey_rsa.rb:52]:
<65537> expected but was
<281479271743489>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 02:02:54 +00:00
nobu 6d8580fe25 * configure.in (Makefile): get rid of confliction with -j.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-23 00:56:46 +00:00
svn e91983b471 * 2012-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 22:52:10 +00:00
naruse 4725c9880d Revert "* configure.in (Makefile): get rid of confliction with -j."
This reverts commit r35104 because it breaks build on FreeBSD.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 22:52:05 +00:00
nobu 2b84626193 * transcode.c (str_encode_bang, encoded_dup): if nothing was
transcoded, just set encoding but leave coderange unchanged as
  forcee_encoding.  [ruby-core:43557][Bug #6190]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 14:14:39 +00:00
shirosaki 7cbff3b9dd * io.c (static int io_fflush): add the definition.
Use it in set_binary_mode_with_seek_cur().

* io.c (set_binary_mode_with_seek_cur): refactoring to split the
  content into io_unread(). Fix the possibility of buffer overflow.

* io.c (io_unread): add new implementation for Windows. Previous one
  caused invalid cursor position using IO#pos with OS text mode. New
  one fixes the bug.

* test/ruby/test_io_m17n.rb
  (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
  above bug.
  [ruby-core:43497] [Bug #6179]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 14:05:31 +00:00
nobu 3d22e33a06 * include/ruby/win32.h (fstati64): fix macro conflicts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 11:47:19 +00:00
nobu ff075693c9 * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
to time_t directly, not to be affected by TZ unnecessarily.
* win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME
  simply.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 10:55:11 +00:00
nobu 0b83d3b27b * test/ruby/test_m17n.rb (test_env): show failed values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 09:37:47 +00:00
nobu d28c18966d * regint.h (BITS_IN_ROOM, BS_ROOM, BS_BIT): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 09:37:44 +00:00
nobu 9accaad5c4 * configure.in (Makefile): add missing test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 06:04:09 +00:00
nobu cd71db0ad6 * configure.in (Makefile): check with svn info, since svn 1.7 doesn't
have .svn under descendent directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 05:59:48 +00:00
nobu 11c57111f9 * configure.in (Makefile): get rid of confliction with -j.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 05:59:45 +00:00
nobu 3417dd28a6 TRY_LINK needs EXEEXT
* lib/mkmf.rb (TRY_LINK): need EXEEXT for cross-compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 04:57:04 +00:00
nobu 3911327572 * ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
[Bug #6094]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 04:43:38 +00:00
nobu 24513fe21e workaround for mingw
* lib/mkmf.rb (try_link0, try_compile, try_cpp): check if the target
  file get created actually.  workaround for the case that the exit
  status of a cygwin program seems lost on mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 02:17:30 +00:00
nobu b1bdada158 remove conftest files
* lib/mkmf.rb (try_constant): remove conftest files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 02:17:26 +00:00
svn 9959405655 * 2012-03-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 02:14:47 +00:00
usa caf627afce * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
see [ruby-core:43550]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-22 02:14:42 +00:00
naruse b2cc0976a7 * regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
[Bug#6143] [Bug#6144] [Bug#6145]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21 10:53:06 +00:00
svn 51f41bb843 * 2012-03-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21 08:03:14 +00:00
usa af86dba25a * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
see [Bug #6179][ruby-core:43518]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21 08:03:08 +00:00
svn 905eb21dca * 2012-03-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-20 13:55:03 +00:00
nobu 1e42030f2a test_thread: test_condvar_wait_not_owner duplicates test_condvar_nolock
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-20 13:54:59 +00:00
shugo ded27bf5dc * enumerator.c (lazy_flat_map_func): convert the block value to
Array if it doesn't respond to each.  [ruby-core:43334]
  [Bug #6155]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-19 08:22:29 +00:00
shugo 592a629bd0 * enum.c (zip_i): variadic argument needs explicit cast on the
platforms where VALUE is longer than int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-19 07:39:12 +00:00
shugo 831898bd99 * enumerator.c (enumerable_lazy): add an example of take and first
to the documentation.  [ruby-core:43344] [Bug #6158]
  add the description of the behavior when a block is given to zip
  or cycle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-19 06:41:02 +00:00
nobu 0d1c2268a8 * compile.c (iseq_specialized_instruction): DRY and replace chain
of if-else with switch for special instructions.  based on a
  patch by Vasfed.  https://github.com/ruby/ruby/pull/105


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-19 06:20:55 +00:00
shyouhei d4f0f28430 * test/test_pty.rb: same as r29280, skip tests when PTY allocation
failed (that's not our fault).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-19 06:08:44 +00:00
svn 27c5389879 * 2012-03-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 15:21:04 +00:00
nobu f4aff7feb1 num2ll and num2ull
* ext/-test-/num2int/num2int.c (print_num2ll, print_num2ull): define
  only if long long is available, and use long long printf modifier
  checked by configure.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 15:21:04 +00:00
nobu bd377449f0 volatile errinfo
* eval_jump.c (rb_exec_end_proc): need volatile to prevent from
  setjmp/longjmp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 15:21:00 +00:00
nobu e30dbb3671 fix condition for free
* gc.c (aligned_free): fix condition for free.  memalign() and
  posix_memalign() are not defined together normally.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 14:21:31 +00:00
yugui 1d006f353d * gc.c (aligned_malloc, aligned_free): added fallback implementations
for platforms like OSX Leopard.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 11:15:50 +00:00
nobu 3175fbf194 * win32/Makefile.sub: put an empty line between stub and script.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 10:45:05 +00:00
nobu ed4c5f38ba * bignum.c (rb_big_pow): estimate result bit size more precisely.
[ruby-core:30735][Feature #3429]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 08:17:50 +00:00
nobu 2555f3f5bf * gc.c (free_method_entry_i): method entry may be in
unlinked_method_entry_list.  [ruby-core:43383][Bug #6171]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 08:17:39 +00:00
akr 7e78f6f526 * compile.c: typo fix by Run Paint Run Run.
[ruby-core:28368] [Bug #2824]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 06:28:41 +00:00
svn ef4ea58cbf * 2012-03-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-18 01:03:39 +00:00