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

209 Коммитов

Автор SHA1 Сообщение Дата
nobu efb9a0fc18 call_without_gvl.c: no sys/select.h
* ext/-test-/gvl/call_without_gvl/call_without_gvl.c: sys/select.h
  is included by ruby/define.h if available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14 23:23:48 +00:00
kosaki 8ecd3b7114 * thread.c (thread_start_func_2): don't interrupt when last thread exit
unless main thread is already exited. Otherwise main thread could be
  wrongly interrupted when it uses rb_thread_call_without_gvl(). Patch
  by Takehiro Kubo. [Bug #11237][ruby-dev:49044][GH-898]
* test/-ext-/gvl/test_last_thread.rb: new test for the above fix.
* ext/-test-/gvl/call_without_gvl/call_without_gvl.c: new ext for the
  above test.
* ext/-test-/gvl/call_without_gvl/extconf.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-14 22:52:01 +00:00
nobu 47349e8701 notimplement: rename
* ext/-test-/notimplement, test/-ext-/test_notimplement.rb:
  rename from bug-3662.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17 14:47:36 +00:00
odaira fadd0160d0 * ext/-test-/file/fs.c: need to include sys/statvfs.h
to use statvfs().

* ext/-test-/file/extconf.rb: check the existence of
  sys/statvfs.h

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-03 13:54:54 +00:00
nobu 684fe92dcc nofree.c: Bug::String.nofree
* ext/-test-/string/nofree.c: new method for test of r50334.
  [ruby-core:68436] [Bug #10942]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-17 03:55:53 +00:00
nobu 3dba6dabb6 printf.c: uint_to_str
* ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
  conflict on cygwin.  [ruby-core:68877] [Bug #11065]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-14 02:25:27 +00:00
akr a96034cf10 * ext/-test-/file/fs.c: OpenBSD needs sys/param.h before sys/mount.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 00:01:11 +00:00
nobu 526b12964f fs.c: fix f_type
* ext/-test-/file/fs.c (get_fsname): try magic number only if
  f_type is included.  [ruby-dev:48913] [Bug #11000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-25 08:03:11 +00:00
nobu acae106c7c fs.c: use statfs/statvfs
* ext/-test-/file/fs.c (get_fsname): return filesystem name by
  statfs/statvfs.  [ruby-core:68624] [Bug #10998]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-24 08:30:15 +00:00
nobu 7e091d24ce cstr.c: nil iff terminated validly
* ext/-test-/string/cstr.c (bug_str_cstr_term_char): return nil
  only when terminated validly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-27 04:09:04 +00:00
nobu b3edab35ca cstr.c: cstr_term_char class method
* ext/-test-/string/cstr.c (bug_str_s_cstr_term_char): add a class
  method to see plain Strings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:00:56 +00:00
nobu 5fb4f81eec cstr.c: get rid of exception
* ext/-test-/string/cstr.c (bug_str_cstr_term_char): get rid of
  invalid byte sequence exception.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-26 02:00:43 +00:00
nobu c9b3950d30 ext/-test-/dln/empty: move from ext/-test-/win32/dln
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:14:54 +00:00
nobu 7b4520374d ext/-test-/win32/dln: add depend file
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05 15:14:48 +00:00
nobu 48436ac69e hash/delete.c: add declaration
* ext/-test-/hash/delete.c: add declaration of the function in
  internal.h.  [Bug #10623]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 06:58:48 +00:00
ko1 9c6eaad723 * hash.c (rb_hash_delete): return Qnil if there are no corresponding
entry. [Bug #10623]
* hash.c (rb_hash_delete_entry): try delete and return Qundef if there
  are no corresponding entry.
* internal.h: add rb_hash_delete_entry()'s declaration.
* symbol.c: use rb_hash_delete_entry().
* thread.c: use rb_hash_delete_entry().
* ext/-test-/hash/delete.c: use rb_hash_delete_entry().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 02:53:37 +00:00
akr ecedd3b224 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19 13:34:54 +00:00
nobu f64ba5d519 iseq_load.c: rb_path2class
* ext/-test-/iseq_load/iseq_load.c (Init_iseq_load): use
  rb_path2class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 23:24:57 +00:00
normal 9581954a96 mostly fix rb_iseq_load
This allows reporters commenters of [Feature #8543] to load
instruction sequences directly.  Some test cases are still failing
but documented in test/-ext-/iseq_load/test_iseq_load.rb.

* compile.c (rb_iseq_build_from_exception): entry->sp is unsigned
  (iseq_build_callinfo_from_hash): account for kw_arg
  (iseq_build_from_ary_body): update for r35459
  (CHECK_STRING, CHECK_INTEGER): remove unused checks
  (int_param): new function for checking new `params' hash
  (iseq_build_kw): new function for loading rb_iseq_param_keyword
  (rb_iseq_build_from_ary): account for `misc' entry and general
   structure changes
  [Feature #8543]
* iseq.c (CHECK_HASH): new macro (for `misc' and `param' entries)
  (iseq_load): account for `misc' and `params' hashes
  (iseq_data_to_ary): add final opt to arg_opt_labels,
   fix kw support, account for unsigned entry->sp
* ext/-test-/iseq_load/iseq_load.c: new ext for test
* ext/-test-/iseq_load/extconf.rb: ditto
* test/-ext-/iseq_load/test_iseq_load.rb: new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 22:16:58 +00:00
nobu e580a631be use 0 for reserved
use 0 for rb_data_type_t::reserved instead of NULL, since its type
may be changed in the future and possibly not a pointer type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 06:38:04 +00:00
nobu 8eb0c810b2 get rid of inadvertent ID creation
* object.c (rb_mod_const_get, rb_mod_const_defined): ditto.
* variable.c (rb_const_missing, rb_mod_const_missing): call
  const_missing without new ID to get rid of inadvertent ID
  creation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 16:11:55 +00:00
akr 6ca202fcee Update dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 03:04:44 +00:00
akr 20fe728a24 Dependencies updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-18 15:28:08 +00:00
nobu 6f7527996e proc/receiver.c: commit miss
* ext/-test-/proc/receiver.c: wrapper for rb_current_receiver.
  [Feature #10195]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 18:17:24 +00:00
nobu b1acfbc121 ext/-test-/proc/super.c: rename
* ext/-test-/proc/super.c: renamed the file and maker method.
  [Feature #10195]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16 10:11:28 +00:00
akr 7cd76ab0c5 * internal.h: Include ruby.h and ruby/encoding.h to be
includable without prior inclusion.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:49:06 +00:00
akr dd547e1b22 Mark auogenerated part.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 11:14:08 +00:00
akr 57682b05e1 * common.mk: Remove comments in Dependency lines.
Notified by usa.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 10:28:25 +00:00
akr 8727eb77be * tool/update-deps: Extend to fix dependencies.
* common.mk: Dependencies updated by tool/update-deps.

* enc/depend: Ditto.

* ext/**/depend: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15 05:15:49 +00:00
nobu 770128ade3 test_bmethod.rb: block in bmethod test
* test/-ext-/proc/test_bmethod.rb (test_super_in_bmethod): block
  in bmethod test for [Feature #10195].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 14:58:33 +00:00
nobu 26ae645501 vm.c: super in bmethod
* vm_eval.c (vm_call_super): allow bound proc method to call super
  method.
* vm_insnhelper.c (vm_yield_with_cfunc): push defined class and
  bound proc method entry to the control frame.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 14:25:52 +00:00
nobu 3614f8bd1c string.c: wchar terminator
* string.c (rb_str_lstrip_bang, rb_str_rstrip_bang): terminate
  wchar strings with wchar 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 01:54:22 +00:00
nobu 2f00182634 suppress warnings
* vm.c (rb_vm_make_proc): cast to suppress warning by VC6.

* ext/-test-/win32/console/attribute.c (console_set_attribute):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 07:25:41 +00:00
nobu 7b011fd11e * ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: remove
test for snprintf(3).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 05:03:50 +00:00
nobu 2320264ef6 foreach.c: printf specifier
* ext/-test-/st/foreach/foreach.c: get rid of hard coded "%lu",
  since st_data_t depends on the platforms.  use PRIuVALUE with
  casting VALUE instead since there is no specifier for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 05:36:18 +00:00
nobu d4c22161f3 test/-ext-/hash/test_delete.rb: assert deleted values
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 14:18:32 +00:00
nobu ca7835bec6 hash.c: rb_hash_delete does not call the block
* hash.c (rb_hash_delete): now does not call the block given to
  the current method.  [ruby-core:65861] [Bug #10413]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-23 12:42:57 +00:00
normal f8b219e4d6 st: test packed-to-unpacked transitions during iteration
The st_foreach and st_foreach_check functions support transitioning
from a packed to an unpacked state during iteration.  However, this
functionality did not get exercised by the current test suite until
now.  This should help us prevent breakage when making modifications
to st.

* ext/-test-/st/foreach/extconf.rb: new file
* ext/-test-/st/foreach/foreach.c: ditto
* test/-ext-/st/test_foreach.rb: ditto
  [Feature #10321]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-09 07:16:19 +00:00
nobu bb10a21346 ruby.h: deprecate plain Data
* include/ruby/ruby.h (rb_data_object_alloc_deprecated): deprecate
  Data_Make_Struct and Data_Wrap_Struct.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27 01:28:47 +00:00
naruse a8ec4b2cf2 * string.c (sym_find): remove Symbol.find because we have Symbol GC now.
https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20140904Japan
  If you still want this, request again on Redmine. [Feature #7854]
  https://bugs.ruby-lang.org/issues/7854

* ext/-test-/symbol/init.c (sym_find): moved from string.c for tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11 21:22:52 +00:00
akr d03315d84a * configure.in (dirfd): Check function.
* dir.c (dir_fileno): New method.
  [ruby-dev:48265] [Feature #9880]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-04 15:54:04 +00:00
nobu 34ec7c5b49 win32/test_console_attr.rb: reset attributes
* ext/-test-/win32/console/attribute.c (console_set_attribute):
  set console attribute.

* test/-ext-/win32/test_console_attr.rb (reset): reset attributes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 13:10:34 +00:00
nobu 43b00d8a11 win32.c: manage reverse video
* win32/win32.c (constat_attr): manage reverse video internally
  since Windows console window does not manage it.  based on the
  patch by white leaf in [ruby-dev:48483].  [Bug #10158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-21 08:10:34 +00:00
nobu 27c4fb3361 ext: get rid of inadvertent ID creation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-03 01:56:16 +00:00
nobu 5cc1d57c39 fileno.c: suppress warnings
* ext/-test-/dir/fileno.c (dir_check): suppress unused-function
  warnings, used only when dirfd() is available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 03:18:08 +00:00
nobu 279aaaf9a4 printf.c: suppress warnings
* ext/-test-/printf/printf.c (printf_test_call): suppress
  maybe-uninitialized warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 03:18:07 +00:00
akr 83ead3c4a7 * ext/-test-/dir: Dir#fileno implemented.
* test/lib/minitest/unit.rb (find_fds): Don't return the fd used to
  scan /proc/$$/fd.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29 22:28:47 +00:00
nobu bae87a4790 vsnprintf.c: fix string precision
* vsnprintf.c (BSD_vfprintf): fix string width when precision is
  given.  as the result of `memchr` is NULL or its offset from the
  start cannot exceed the size, the comparison was always false.
  [ruby-core:62737] [Bug #9861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25 02:56:36 +00:00
nobu bd403755d0 remove trailing spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 10:58:08 +00:00
naruse fa244db49b add Bug::File::Fs.fsname for tests
get filesystem type name for given path

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22 10:39:29 +00:00