Commit graph

5743 commits

Author SHA1 Message Date
nagachika
bd210ff164 merge revision(s) 52556,52557: [Backport #10735]
* ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 15:37:52 +00:00
nagachika
557ba3fee5 merge revision(s) 51722,51724: [Backport #11376]
* ext/openssl/ossl_ssl.c (static const struct): Only add SSLv3 support
	  if the SSL library supports it.  Thanks Kurt Roeckx <kurt@roeckx.be>
	  [Bug #11376]

	* ext/openssl/extconf.rb: check for SSLv3 support in the SSL
	  implementation.

	* test/openssl/test_ssl.rb (class OpenSSL): Skip tests that need SSLv3
	  if there is no support.

	* ext/openssl/ossl_ssl.c (ossl_ssl_method_tab): Only add SSLv3 support


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@52649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 14:38:49 +00:00
nagachika
776c8182f0 merge revision(s) 51575,51584: [Backport #11439]
* ext/win32/lib/win32/registry.rb (API#SetValue): add terminator
	  size, not 1 byte.  [ruby-core:70365] [Bug #11439]

	* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
	  be in bytes, not in chars.  [ruby-core:70365] [Bug #11439]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-17 14:02:55 +00:00
nagachika
4fe4f46592 merge revision(s) 50339,50340,50342,50343: [Backport #10705]
parser.rl: use StringValue

	* ext/json/parser/parser.rl (cParser_initialize): use StringValue
  instead of direct rb_convert_type and remove duplicate
  conversion.
	* ext/json/parser/parser.rl: raise with messages in UTF-8
	  encoding.  [ruby-core:67386] [Bug #10705]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-14 06:20:41 +00:00
nagachika
04a567fb4b merge revision(s) 51409,51453: [Backport #10910]
* ext/openssl/lib/openssl/ssl.rb (module OpenSSL): raise a more
	  helpful exception when verifying the peer connection and an
	  anonymous cipher has been selected. [ruby-core:68330] [Bug #10910]
	  Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for the patch.

	* test/openssl/test_ssl.rb (class OpenSSL): test for change

	* .travis.yml: update libssl before running tests. 
	  Thanks to Chris Sinjakli <chris@sinjakli.co.uk> for figuring out the
	  travis settings!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12 15:16:42 +00:00
nagachika
6cf3dc3145 merge revision(s) 50104,50105: [Backport #10906]
* ext/date/extconf.rb: try_cflags("-std=iso9899:1999") [Bug #10906]
	  ruby itself (including numeric.c) is built with strict compile
	  options including -std=iso9899:1999, but ext/date is not.
	  By the way -std=iso9899:1999 is not only a warning option but also
	  changes behavior like MACRO definitions for example INFINITY.
	  gcc on Solaris affect this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12 14:58:06 +00:00
nagachika
23f12a0660 merge revision(s) 50089: [Backport #11342]
* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,
	  but it is a dummy.

	* ext/socket/option.c: Solaris 11 doesn't have u_intN_t.

	* ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec.

	* ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have
	  related macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-10 15:33:59 +00:00
nagachika
9a3e7b6913 merge revision(s) 50860: [Backport #11249]
* ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.
	  [fix GH-929] Patch by @voxik

	* ext/io/console/io-console.gemspec: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 19:17:07 +00:00
nagachika
b46a497ac3 merge revision(s) 50834: [Backport #11221]
* ext/zlib/zlib.c: Fix indentation for rdoc.
	  [Bug #11221][ruby-core:69465]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30 19:15:53 +00:00
nagachika
1343c89ecb merge revision(s) 50982,50983: [Backport #11291]
* ext/objspace/objspace_dump.c(dump_object): Return empty JSON object when
	  passed object is a special const, instead of SEGV.
	  Based patch by Kohei Suzuki (eagletmt). [ruby-core:69692] [Bug #11291]

	* test/objspace/test_objspace.rb(test_dump_special_consts): Test for above fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@51047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-27 14:12:49 +00:00
nagachika
7ebca22266 merge revision(s) 50685: [Backport #11198]
* ext/socket/ancdata.c: use RB_GC_GUARD instead of volatile
	  [ruby-core:69419] [Feature #11198]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11 17:18:12 +00:00
nagachika
70e6382b73 merge revision(s) 50646: [Backport #11185]
* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
	  ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
	  [ruby-core:69371] [Bug #11185]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11 16:38:12 +00:00
nagachika
55849b02bd merge revision(s) 50449: [Backport #11123]
* ext/socket/ancdata.c (bsock_recvmsg_internal): GC guard
	  [Bug #11123]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 18:53:48 +00:00
nagachika
3a35a8e9dc merge revision(s) 50404,50405: [Backport #10975]
* ext/socket/ipsocket.c (init_inetsock_internal): preserve errno
	  before other library calls and use rb_syserr_fail.
	  [ruby-core:68531] [Bug #10975]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 18:31:26 +00:00
nagachika
d15084fbcf merge revision(s) 50305: [Backport #11065]
* 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/branches/ruby_2_2@50625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 18:02:05 +00:00
nagachika
645b4e1130 merge revision(s) 50187,50202: [Backport #11051]
* ext/socket/raddrinfo.c (addrinfo_mload): fix memory leak of
	  addrinfo.  [ruby-dev:48923] [Bug #11051]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 17:42:42 +00:00
nagachika
f0f734fda2 merge revision(s) 50185: [Backport #10952]
* bigdecimal: conform to ruby's license.  [ruby-core:68466] [Bug #10952]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 17:18:23 +00:00
nagachika
c92fa1fdad merge revision(s) 50071,50088: [Backport #10998] [Backport #11000]
* ext/-test-/file/fs.c (get_fsname): return filesystem name by
	  statfs/statvfs.  [ruby-core:68624] [Bug #10998]

	* 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/branches/ruby_2_2@50621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-23 17:15:12 +00:00
nagachika
1d8b1d8c32 merge revision(s) 49776: [Backport #9144]
* ext/pty/pty.c: AIX supports autopush.
	  Patch by Perry Smith [ruby-core:58539] [Bug #9144]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-20 16:32:55 +00:00
nagachika
20ef4699e5 merge revision(s) 50334,50337: [Backport #10942]
* string.c (STR_SET_EMBED): clear NOFREE flag at embedding as
	  embedded strings no longer refer static strings.
	  [ruby-core:68436] [Bug #10942]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-19 19:52:07 +00:00
nagachika
15edfd96a2 merge revision(s) 50292: [Backport #9644]
* ext/openssl/lib/openssl/ssl.rb: stricter hostname verification
	  following RFC 6125. with the patch provided by Tony Arcieri and
	  Hiroshi Nakamura [ruby-core:61545] [Bug #9644]

	* test/openssl/test_ssl.rb: add tests for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-13 13:13:01 +00:00
nagachika
1cc6f36317 merge revision(s) 49797: [Backport #10923]
* ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX
	  Thanks to Yura Sokolov <funny.falcon@gmail.com>
	  [ruby-core:68369] [Bug#10923]

	* test/io/wait/test_io_wait.rb (test_nread_buffered):
	  fix broken test


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 15:46:26 +00:00
nagachika
3195a2e898 merge revision(s) 49007,49009,49957: [Backport #10960]
* ext/fiddle/extconf.rb: make PIC objects if it will be linked as
	  a shared object eventually.  [ruby-core:67128]

	* ext/fiddle/extconf.rb: needs --enable-shared when linked to
	  libruby or fiddle.so.  since --with-static-linked-ext does no
	  longer link extensions to ruby program with --enable-shared, the
	  only combination needs --enable-static is --disable-shared and
	  --with-static-linked-ext.  [ruby-dev:48901] [Bug #10960]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12 15:04:56 +00:00
naruse
35f8beefb6 merge revision(s) 49750: [Backport #10876]
* ext/win32/Win32API.rb (initialize): accept both a string and an array
	  for the arguments of the imported function.
	  reported by Aaron Stone [ruby-core:68208] [Bug #10876] [Fixes GH-835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-26 08:23:50 +00:00
naruse
97c3018a5d merge revision(s) 49491: [Backport #10823]
* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix a typo, 'expoennt'
	  to 'exponent'.  [ruby-core:67980] [Bug #10823] [Fix GH-825]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-21 03:46:03 +00:00
naruse
964a1b683a merge revision(s) 49402,49403,49414:
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/branches/ruby_2_2@49650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-19 08:32:27 +00:00
naruse
ffbc561292 merge revision(s) 49494: [Backport #10825]
_sdbm.c: fix pointers to shift

	* ext/sdbm/_sdbm.c (delpair): dst and src point at the ends of
  each data, whereas memmove requires pointers to the beginnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-19 06:35:44 +00:00
naruse
490165e5e3 merge revision(s) 49490: [Backport #10825]
* ext/sdbm/_sdbm.c: include ruby/ruby.h for PRIdPTRDIFF when a
	  macro `DEBUG` is defined.  based on the patch by Owen Rodley in
	  [ruby-core:67987]. [Bug #10825]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-19 04:35:54 +00:00
naruse
eef3f0d94c merge revision(s) 49542: [Backport #10820]
* ext/win32/lib/win32/registry.rb (Win32::Registry::API): use wide
	  versions of RegDeleteValue and RegDeleteKey.
	  [ruby-core:67958] [Bug #10820]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-17 06:39:13 +00:00
naruse
4aacaf216c merge revision(s) 49543: [Backport #10854]
* ext/socket/getaddrinfo.c (get_addr): reject too long hostname to
	  get rid of GHOST vulnerability on very old platforms.

	* ext/socket/raddrinfo.c (make_hostent_internal): ditto, paranoic
	  check for the canonnical name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-15 04:16:03 +00:00
naruse
20a130427b merge revision(s) 49397: [Backport #10780]
* ext/fiddle/win32/libffi.mk.tmpl: assemble without directory prefix.
	  workaround of a bug of VC12 ml, by unak at [ruby-core:67792].
	  [ruby-core:67789] [Bug #10780]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-06 03:02:27 +00:00
naruse
a45cd37557 merge revision(s) 49315: [Backport #10697]
* ext/win32ole/win32ole.c (ole_invoke): avoid SEGV when VT_RECORD
	  variable is passed by reference. [ruby-dev:48803] [Bug #10697] 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-20 05:05:33 +00:00
naruse
b66b645230 merge revision(s) 49244: [Backport #6232]
* ext/readline/readline.c (readline_s_refresh_line): initialize
	  before rl_refresh_line(), as some function make the internal
	  state non-clean but rl_refresh_line() does not re-initialize it.
	  [ruby-core:43957] [Bug #6232]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-17 07:50:07 +00:00
naruse
2348b51bae merge revision(s) 49202: [Backport #10668]
* ext/zlib/zlib.c: fix document of method signatures.
	  [Bug #10668][ruby-core:67186][ci skip]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-16 16:58:11 +00:00
naruse
3b53af4584 merge revision(s) 49034: [Backport #10662]
* ext/tk/lib/tkextlib/tcllib/plotchart.rb: fix to invoke correct function
	  of tcllib. Patch by @zalt50 [fix GH-787]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@49080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-31 05:13:11 +00:00
nobu
945e4692ca console.c: IO.console arguments passing
* ext/io/console/console.c (console_dev): send the given arguments
  to the opened console.  as a special case, do nothing if :close
  is given.
* test/lib/leakchecker.rb (LeakChecker#check_fd_leak): close if
  console.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 07:14:12 +00:00
nobu
d8d326c97a console.c: get rid of NameError
* ext/io/console/console.c (console_dev): id_console is not a
  constant name, use rb_const_remove() to get rid of NameError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-25 01:09:17 +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
nobu
0a841035df fiddle: depend rules
* ext/fiddle/depend: mark PHONY targets, and workaround of
  unexpected DEPEND_RULES on mswin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 06:58:34 +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
nobu
0cd829c339 fiddle: win32/libffi-config.rb
* ext/fiddle/win32/libffi-config.rb: generate necessary files to
  build on mswin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 02:29:56 +00:00
usa
a54aae45a6 * ext/fiddle/extconf.rb: remove ffitarget.h generated by configure on
mswin, because it's not normal file (cygwin's symlink) and have
  system attribute.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24 00:36:42 +00:00
nobu
840fa8086e fiddle: extlibs
* ext/fiddle/extlibs: libffi-3.2.1 and patch for mswin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 13:39:13 +00:00
nobu
132415bf9e extconf.rb: no empty CPP
* ext/fiddle/extconf.rb: pass CPP only if necessary, should not
  make it empty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 13:07:39 +00:00
nobu
5b6fc3f006 extmk.rb: replace current directory name
* ext/extmk.rb (extmake): replace "./" at beginning in LOCAL_LIBS
  with the current directory name for values cached in previous
  Makefile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 13:05:47 +00:00
nobu
b9ffe579da fiddle: use RMALL
* ext/fiddle/depend (realclean-libffi): use RMALL instead of
  RMDIRS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 11:57:11 +00:00
nobu
276065f870 fiddle: clean-libffi
* ext/fiddle/depend (clean-libffi): clean libffi directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 11:33:54 +00:00
nobu
802d4f9fb2 registry.rb: fix buffer overflow
* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
  should not re-use sliced string as buffer, to get rid of buffer
  overflow.  [ruby-core:65295] [Bug #10300]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 08:58:53 +00:00
nobu
ba3da9af7d registry.rb: try en_US message
* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
  try en_US message if the default message cannot be encoded to
  locale.  [ruby-core:65295] [Bug #10300]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 07:03:37 +00:00
nobu
4c0a560cac extconf.rb: try modversion ff pkg_config succeeded
* ext/fiddle/extconf.rb: when pkg_config failed, module version is
  not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23 06:22:00 +00:00