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

200 Коммитов

Автор SHA1 Сообщение Дата
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
akr 63fee73500 * configure.in: Check nextafter() availability.
* include/ruby/missing.h (nextafter): New optional declaration.

* missing/nextafter.c: New file.

* numeric.c: Float#next_float and Float#prev_float implemented.

   [ruby-core:62562] [Feature #9834]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18 00:37:10 +00:00
nobu 38fd0dc668 symbol/type.c: bug_pindown
* ext/-test-/symbol/type.c (bug_pindown): method for debug, which
  pins down the given symbol.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 01:34:44 +00:00
nobu a80b300416 symbol/type.c: bug_static_p bug_dynamic_p
* ext/-test-/symbol/type.c (bug_static_p, bug_dynamic_p): methods
  for debug, which predicate the given symbol type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02 01:34:41 +00:00
nobu b522335554 test_inadvertent_creation.rb: use Symbol.find
* ext/-test-/symbol/intern.c: Symbol.find is available now.

* test/-ext-/symbol/test_inadvertent_creation.rb (noninterned_name):
  use Symbol.find instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-30 15:16:07 +00:00
naruse c71019f888 * ext/-test-/string/coderange.c: add Bug::String.new#coderange_scan
to explicitly scan coderange.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-21 10:14:46 +00:00
akr 9aa67e267b * bignum.c (SIZEOF_BDIGIT): Renamed from SIZEOF_BDIGITS.
* internal.h: Ditto.

* marshal.c: Ditto.

* rational.c: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-13 03:48:17 +00:00
nobu a237db5cbc dln.c: non-ascii path on Windows
* dln.c (dln_load): use wchar version to load a library in
  non-ascii path on Windows.  based on the patch by Bugra Barin
  <bugrabarin AT hotmail.com> in [ruby-core:61845].  [Bug #9699]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-05 23:52:52 +00:00
nobu afb4bcbfd6 struct.c: not_a_member message
* struct.c (not_a_member): extract name error and use same error
  messages.  based on the patch by Marcus Stollsteimer <sto.mar AT
  web.de> at [ruby-core:61721].  [Bug #9684]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-28 10:32:16 +00:00
usa 1df0e183dd * ext/-test-/win32/dln/libdlntest.c (dlntest_ordinal): no need to
specify export in the source file because .def file do it.
  get rid of warning on linking.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-13 14:52:19 +00:00