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

5646 Коммитов

Автор SHA1 Сообщение Дата
ktsj eebb6bfc79 * ext/socket/basicsocket.c, ext/socket/sockssocket.c:
remove code for $SAFE=4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-07 10:40:27 +00:00
hsbt e599d8d197 * ext/psych/lib/psych.rb: bump version to 2.0.8
* ext/psych/psych.gemspec: ditto.
* ext/psych/psych_emitter.c: ditto.
* ext/psych/psych_parser.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 13:43:13 +00:00
nobu c2fb27ac4a socket/option.c: fix inet_ntop link error on mswin
* ext/socket/option.c (inet_ntop): link aliased inet_ntop in
  libruby on mswin not rb_w32_inet_ntop which fails to link for
  unknown reason.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05 08:09:12 +00:00
nobu 1e6a101237 extmk.rb: no EXTOBJS to main if enable-shared
* ext/extmk.rb: as all extension objects including initializations
  of ext and enc shouild be linked to libruby if enable-shared,
  EXTOBJS should not be linked to main programs.
  [ruby-core:66675] [Bug #10566]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-04 17:27:49 +00:00
nobu 10cd530e40 socket/option.c: use rb_w32_inet_ntop
* ext/socket/option.c (inet_ntop): the fallback implementaion is
  always available on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-04 17:09:52 +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 ed52fa6ef9 tcltklib.c: revert RUBY_UNTYPED_DATA_WARNING
* ext/tk/tcltklib.c (RUBY_UNTYPED_DATA_WARNING): Data_Get_Struct
  is not affected.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 04:04:02 +00:00
nobu c95b3a16bd ruby.h: no warnings of hidden objects
* include/ruby/ruby.h (rb_data_object_alloc_warning): no warnings
  of internal hidden objects which klass == 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 03:25:06 +00:00
nobu b040788b52 tkutil.c: typed data
* ext/tk/tkutil/tkutil.c (cbsubst_info_type): use typed data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 03:25:02 +00:00
nobu 655285b5f7 cparse.c: typed data
* ext/racc/cparse/cparse.c (cparse_params_type): use typed data.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-03 00:48:59 +00:00
suke f9dcfb2bca * ext/win32ole/win32ole.c: use typed data for com_hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-02 12:34:52 +00:00
tenderlove 4297d55ca9 * ext/psych/lib/psych.rb: bumping version
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:48:52 +00:00
tenderlove 12396fda40 * ext/psych/lib/psych/visitors/to_ruby.rb: support objects that are
marshalable, but inherit from basic object.
  Thanks Sean Griffin <sean@thoughtbot.com>

* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto

* test/psych/test_marshalable.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:35:11 +00:00
nobu 012c558127 re.c: rb_reg_region_copy
* re.c (rb_reg_region_copy): new function to try with GC if copy
  failed and return the error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 21:30:58 +00:00
nobu 8b3813f6b0 strscan.c: fix condition
* ext/strscan/strscan.c (strscan_init_copy): fix inverted
  condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 19:47:36 +00:00
nobu 4d63c85031 re.c: check if onig_region_copy failed
* re.c (CHECK_REGION_COPIED): onig_region_copy() can fail when
  memory exhausted but returns nothing, so check by if allocated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 19:43:10 +00:00
suke 7f411d6ed4 * ext/win32ole/win32ole.c: use typed data for WIN32OLE.
* ext/win32ole/win32ole.h: ditto.
* ext/win32ole/win32ole_event.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01 11:03:13 +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 3c45a56746 continuation.c: quiet static-linked-ext
* ext/continuation/continuation.c (Init_continuation): start
  quietly if statically linked.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 19:58:04 +00:00
akr 698f329b55 Update dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-27 12:52:17 +00:00
tarui 262245b0c1 * ext/continuation/continuation.c (Init_continuation): obsolete callcc.
first step of [Feature #10548].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26 11:50:55 +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 8d7f9b0e38 * tool/update-deps (in_makefile): Use FILES_NEED_VPATH and
FILES_CONFUSING.

* ext/objspace/extconf.rb: Add VPATH for id.h



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21 03:04:10 +00:00
usa c1bad60408 * ext/openssl/lib/openssl/x509.rb
(OpenSSL::X509::Name::RFC2253DN::StringChar): get rid of a false
  positive assertion in ripper's test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 15:39:03 +00:00
naruse 219e4fcb45 * ext/nkf/depend (nkf.o): add nkf.c as dependency.
bsdmake tries to make nkf.o with nkf-utf8/nkf.c without this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-20 06:52:16 +00:00
nobu 3a2d2af0f7 common.mk: fix build error
* common.mk (ext/ripper/ripper.c): VPATH is always ../.. from
  ext/ripper.

* ext/ripper/depend (.y.c): VPATH is not needed for an
  intermediate file.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 15:19:33 +00:00
naruse 926b9e05f1 * common.mk (ext/ripper/ripper.c): pass build directory as VPATH.
* ext/ripper/depend (.y.c): use VPATH for y.tab.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-19 09:00:33 +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
suke aed7a09aea ext/win32ole/win32ole_event.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-17 11:18:54 +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
usa fd9f6bde95 * win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): new
function to support nonblock-mode of pipes.

* win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA
  if there is no data, but also returns it if remote-end is closed.

* win32/win32.c (rb_w32_write): if cannot to write any data, it may be
  blocking.

* io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows.

* ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when
  setting nonblock-mode.

* test/ruby/test_io.rb: test nonblock pipes on Windows.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 10:42:19 +00:00
nobu 6ccf3d68c2 win32.c: login name encoding
* ext/etc/etc.c (etc_getlogin): set login name encoding properly.
  [ruby-core:66163] [Bug #10493]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 08:24:36 +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 0066d95fd6 win32/registry.rb: slice in WCHARs
* ext/win32/lib/win32/registry.rb (Win32::Registry::API#Enum{Value,Key):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 03:09:40 +00:00
nobu 13d241489a thread.c: no function callsin RARRAY_LEN
* ext/thread/thread.c (queue_length, queue_num_waiting): avoid
  function calls in RARRAY_LEN macro which evaluates the argument
  multiple times.

* ext/thread/thread.c (rb_szqueue_num_waiting): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-07 16:36:16 +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
usa 2e5610353f * ext/win32/lib/Win32API.rb: Fiddle::Importer is defined in
fiddle/import.rb and it's not loaded implicitly.

* ext/win32/lib/Win32API.rb (Win32API#initialize): `import` is a string.

* ext/win32/lib/Win32API.rb (Win32API#initialize):
  Fiddle::Importer::CALL_TYPE_TO_ABI is private constant.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 12:26:19 +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 dd3aec25d6 Win32API.rb: update message [ci skip]
* ext/win32/lib/Win32API.rb: update warning message for fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 05: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 e3787f8b36 ext/tk/tkutil/tkutil.c: disable untyped data warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 06:22:16 +00:00
nobu 30f69beeba tkutil.c: inherit Data
* ext/tk/tkutil/tkutil.c: use Data as super class, not to inherit
  useless methods.

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