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

44130 Коммитов

Автор SHA1 Сообщение Дата
nobu c93875e6e3 parse.y: node_assign
* parse.y (stmt, command_asgn): unifiy parser and ripper code by
  node_assign macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 02:32:19 +00:00
nobu a2b06fe444 parse.y: backref_assign_error
* parse.y (backref_assign_error): unify parser and ripper code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 02:20:34 +00:00
nobu 76e8f883d8 parse.y: const declaration macro
* parse.y (const_decl): unify parser and ripper code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 02:12:57 +00:00
nobu 0859c42b77 parse.y: const field macros
* parse.y (const_path_field, top_const_field): unify parser and
  ripper code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 01:24:24 +00:00
svn 2bd6264cd8 * 2016-08-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 18:17:42 +00:00
marcandre 2401c512ef * lib/prime.rb: Optimize prime?
Adapted from patch by Jabari Zakiya [#12665]

* test/test_prime.rb: Improve test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 18:17:41 +00:00
nobu 3433653240 parse.y: rhs with rescue modifier
* parse.y (command_rhs, arg_rhs): introduce new rules to reduce
  repeated rules with rescue modifier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 13:37:03 +00:00
nobu 27863a0ccd win32/resolv: fix for cygwin
* ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on
  cygwin.  [ruby-core:76791] [Bug #12663]

* ext/win32/resolv/resolv.c (w32error_make_error): use
  Win32::Resolv::Error, an alias of Win32::Registry::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 11:11:36 +00:00
nobu 064ed74be4 parse.y: rescue modifier in rhs
* parse.y (command_asgn): rescue modifier in command assignment
  should be limited to rhs only.  [ruby-core:75621] [Bug #12402]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 08:26:46 +00:00
svn 89ab385b17 * 2016-08-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 06:35:06 +00:00
nobu 833ad92d18 win32/resolv: fix for cygwin
* ext/win32/resolv/resolv.c: needs windows.h for iphlpapi.h on
  cygwin.  [ruby-core:76791] [Bug #12663]
* ext/win32/resolv/resolv.c (w32error_make_error): use
  Win32::Resolv::Error, an alias of Win32::Registry::Error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 06:35:05 +00:00
kazu 41fe7e4eb9 Remove empty directories
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 12:00:35 +00:00
mrkn ea5184b939 hash.c: implement Hash#map_v and Hash#map_v!
* hash.c (rb_hash_map_v, rb_hash_map_v_bang): impelement Hash#map_v and
  Hash#map_v! [Feature #12512] [ruby-core:76095]

* test/ruby/test_hash.rb: add tests for above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 08:54:15 +00:00
naruse cb18d4ba46 * vm_insnhelper.c (vm_getivar): use always_inline because
gcc7 doesn't inline this without always_inline.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 07:52:23 +00:00
nobu 9a9569b1c2 test_objectspace.rb: errors in a finalizer
* test/ruby/test_objectspace.rb (test_finalizer_with_super):
  adjust number of arguments to get rid of errors in a finalizer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 07:36:14 +00:00
naruse 303dc3c591 * ext/tk: Tk is removed from stdlib. [Feature #8539]
https://github.com/ruby/tk is the new upstream.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 06:44:45 +00:00
nobu f82df94f39 tcltklib.c: repeated checks and conversions [ci skip]
* ext/tk/tcltklib.c (ip_init): get rid of repeated checks and
  conversions in StringValueCStr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 05:05:12 +00:00
nobu 3f6401864a tcltklib.c: use StringValueCStr [ci skip]
* ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core,
  ip_init, ip_create_slave_core, get_obj_from_str,
  ip_cancel_eval_core, lib_set_system_encoding,
  alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr
  instead of StringValuePtr for values to be passed to Tcl
  interperter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 05:05:11 +00:00
nobu 56689eaca9 tcltklib.c: use PRIsVALUE [ci skip]
* ext/tk/tcltklib.c (set_max_block_time): use PRIsVALUE to get rid
  of dangling pointer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 05:05:10 +00:00
nobu 0d15e30a48 tcltklib.c: missing break [ci skip]
* ext/tk/tcltklib.c (set_max_block_time): fix missing break.
  TclTkLib.set_max_block_time(1) works but
  TclTkLib.set_max_block_time(1.0) didn't.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 05:05:09 +00:00
nobu d8d78f07ae tcltk.rb: suppress a warning [ci skip]
* ext/tk/lib/tcltk.rb (TclTkWidget#initialize): suppress an
  "assigned but unused variable" warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 01:42:51 +00:00
nobu ed3139b79f tcltklib/sample2.rb: use attr_accessor [ci skip]
* ext/tk/sample/tcltklib/sample2.rb (Othello::BoardView::Square):
  use attr_accessor instead of attr with optional boolean
  argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 01:42:49 +00:00
nobu 5a80f0c530 use true and false [ci skip]
* ext/tk/lib/tk/texttag.rb, ext/tk/sample/tcltklib/sample2.rb,
  ext/tk/sample/tkline.rb, ext/tk/sample/tktimer.rb: use true and
  false instead of TRUE and FALSE.

* ext/win32ole/sample/ienavi.rb (stop_msg_loop): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-09 01:42:48 +00:00
svn dfc9cb4005 * 2016-08-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 15:16:31 +00:00
kazu 38fc851d36 * doc/maintainers.rdoc: Remove moved file section.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 15:16:30 +00:00
suke 449971300b * ext/win32ole/sample/excel1.rb, ext/win32ole/sample/excel2.rb,
ext/win32ole/sample/excel3.rb, ext/win32ole/sample/ie.rb,
  ext/win32ole/sample/ienavi.rb, ext/win32ole/sample/ienavi2.rb: use
  true instead of deprecated TRUE. [ci skip]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 12:04:45 +00:00
nobu 6a6a4126d4 internal.h: fix r55831
* internal.h (RBASIC_CLEAR_CLASS): fix compile error and size to
  fill.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 05:11:51 +00:00
nobu d81e5593b7 test/unit.rb: no verbose in worker processes
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch):
  disable verbose flag in worker processes, get rid of unexpected
  output within marshaled results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 05:04:36 +00:00
shyouhei 869e7809a3 * internal.h (RBASIC_CLEAR_CLASS): Reroute ANSI C's strict
aliasing rule.
  	  [ruby-core:74427][Bug #12191][ruby-core:76747][Bug #12657]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08 04:19:58 +00:00
svn 0c5fb7df2a * 2016-08-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 16:33:05 +00:00
kazu 2bfb854813 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 16:33:04 +00:00
nobu f306bb0fed suppress warnings
* basictest/runner.rb, bootstraptest/runner.rb: disable warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 10:34:11 +00:00
nobu df0e70b90a vcs.rb: suppress warnings
* tool/vcs.rb (VCS#modified): get rid of set but unused variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 10:34:10 +00:00
nobu 489456e999 extmk.rb: suppress a warning
* ext/extmk.rb: get rid of shadowing outer local variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 10:05:57 +00:00
nobu 78728b89df extmk.rb: remove sysquote
* ext/extmk.rb (sysquote): removed.  unnecessary since r52161.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 10:04:41 +00:00
nobu 41d220441d deprecate TRUE,FALSE,NIL
* object.c (InitVM_Object): deprecate toplevel constants TRUE,
  FALSE, and NIL.  [Feature #12574]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-07 09:08:29 +00:00
svn f5f6859b42 * 2016-08-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-06 21:50:11 +00:00
normal 7513d54659 openssl: avoid undefined behavior on empty SSL_write
SSL_write(3ssl) manpage has this in the WARNINGS section:

       When calling SSL_write() with num=0 bytes to be sent the
       behaviour is undefined.

And indeed, the new test case demonstrates failures when
empty strings are used.  So, match the behavior of IO#write,
IO#write_nonblock, and IO#syswrite by returning zero, as the
OpenSSL::SSL::SSLSocket API already closely mimics the IO one.

* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal):
  avoid undefined behavior
* test/openssl/test_pair.rb (test_write_zero): new test
  [ruby-core:76751] [Bug #12660]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-06 21:50:10 +00:00
nobu a62dcd947c id_table.h: dummy sentinel
* id_table.h (rb_id_table_iterator_result): add dummy sentinel
  member because C standard prohibits a trailing comma.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-06 00:35:33 +00:00
svn b46a8a5476 * 2016-08-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 15:39:47 +00:00
nobu e70df3a701 hash.c: env_name_new
* hash.c (env_enc_str_new): make string for an environment
  variable name or value.
* hash.c (env_name_new): make environment value string with the
  encoding for its name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 15:39:46 +00:00
usa 549605c15d * hasn.c (env_str_new): taint the string. get rid of a test failure
introduced at r55811.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 14:19:26 +00:00
nobu 743c279d70 win32.c: initialize with an impossible value
* win32/win32.c (getifaddrs, rb_w32_getppid): initialize the API
  pointers with an impossible value not to try everytime on old
  platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:31:23 +00:00
nobu 518af61ba6 win32.c: static API pointers
* win32/win32.c (rb_w32_inet_ntop, rb_w32_inet_): make the
  API pointers static not to get the address everytime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:28:03 +00:00
nobu bd46ad2195 win32.c: call get_final_path pointer
* win32/win32.c (get_final_path): initialize this pointer without
  further comparisons.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:22:35 +00:00
svn ad9d8468e6 * 2016-08-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:04:05 +00:00
nobu cb0cde7f24 hash.c: call w32_getenv pointer
* hash.c (w32_getenv): call rb_w32_getenv and rb_w32_ugetenv via
  this pointer without further comparisons.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-05 08:04:04 +00:00
svn dd96e0c76a * 2016-08-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-04 02:54:33 +00:00
nobu 9e1b9b9c8f hash.c: set encoding
* hash.c (env_assoc): the encoding of the value should be the
  locale, as well as other methods, [], fetch, values, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-04 02:54:32 +00:00
nobu 18cf70ebf6 parse.y: reg_fragment_enc_error
* parse.y (reg_fragment_enc_error): compile_error is different
  between parser and ripper.  [ruby-core:76397] [Bug #12651]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-03 12:31:25 +00:00