Commit graph

6172 commits

Author SHA1 Message Date
nagachika
686fbc8e5f merge revision(s) 55497,55498,55504: [Backport #11988]
* ext/psych/*, test/psych/*: Upate psych 2.1.0
	  This version fixed [Bug #11988][ruby-core:72850]

	* ext/psych/*, test/psych/*: Update psych 2.1.0


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 17:56:05 +00:00
nagachika
72e63983e6 merge revision(s) 55434: [Backport #12401]
* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
	  different than ENCOBJS, to get rid of circular dependency.
	  build libencs when linking encodings statically.
	  [ruby-core:75618] [Bug #12401]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 19:26:43 +00:00
nagachika
88d76cfdcd merge revision(s) 55100: [Backport #12292]
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct
	  here. Since some methods such as SSLSocket#connect releases GVL,
	  there is a chance of use after free if we free the SSL from another
	  thread. SSLSocket#stop was documented as "prepares it for another
	  connection" so this is a slightly incompatible change. However when
	  this sentence was added (r30090, Add toplevel documentation for
	  OpenSSL, 2010-12-06), it didn't actually. The current behavior is
	  from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15).
	  [ruby-core:74978] [Bug #12292]

	* ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc.

	* test/openssl/test_ssl.rb: Test this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 17:58:25 +00:00
nagachika
a3600fc377 merge revision(s) 55380: [Backport #12255]
* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
	  class description. [ci skip][Bug #12255][ruby-core:74835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 16:30:43 +00:00
nagachika
1049e08aa7 merge revision(s) 55123,55129,55130,55133,55136: [Backport #12414]
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider
	  non-finite float values not to raise FloatDomainError.
	  [ruby-core:75682] [Bug #12414]

	* ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
	  exist.  fixed build error on Windows introduced at r55123.

	* ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning on
	  cygwin. [Bug #12417][ruby-core:75691]

	* include/ruby/missing.h (isfinite): move from numeric.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-18 19:48:54 +00:00
nagachika
805e78248f merge revision(s) 54721: [Backport #12311]
* ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime
	  documentation to RDoc from Markdown.
	  [ruby-core:75136] [Bug #12311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-13 17:58:50 +00:00
nagachika
10685d4f71 merge revision(s) 53322,53323: [Backport #11880]
* ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
	  string conversion. 
	  [Bug #11880]
	  Thanks Akio Tajima for the patch!
	  string conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-05 17:28:45 +00:00
nagachika
2d360c5e95 merge revision(s) 54755: [Backport #12313]
* encoding.c: Fix return value of `Encoding::ISO8859_1.name`
	  [Bug #12313][ruby-core:75147][ci skip]

	* ext/bigdecimal/bigdecimal.c: Fix code sample of `BigDecimal.new`


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-25 17:55:14 +00:00
nagachika
9224427bb5 merge revision(s) 54423,54489: [Backport #12201] [Backport #12202]
* ext/nkf/nkf-utf8/nkf.c: Merge upstream 4f3edf80a0.
	  patched by Anton Sivakov [Bug #12201] [Bug #12202]

	* ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo.
	  [Bug #12202] [ruby-core:74802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-22 15:39:27 +00:00
naruse
9dc33b83bb merge revision(s) 54611,54612: [Backport #12291]
* struct.c (struct_make_members_list): extract making member name
	  list from char* va_list, with creating symbols without
	  intermediate IDs.

	* struct.c (struct_make_members_list, rb_struct_s_def): member
	  names should be unique. [ruby-core:74971] [Bug #12291]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18 09:12:46 +00:00
naruse
79e826d7f1 merge revision(s) 54529: [Backport #12264]
* ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix
	  API names.  [ruby-core:74863] [Bug #12264]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18 08:54:57 +00:00
naruse
157401a9a1 merge revision(s) 54484: [Backport #12095]
* vm_core.h (rb_vm_struct): make at_exit a single linked list but
	  not RArray, not to mark the registered functions by the write
	  barrier.  based on the patches by Evan Phoenix.
	  [ruby-core:73908] [Bug #12095]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18 08:15:33 +00:00
naruse
1b327a0804 merge revision(s) 54465: [Backport #12237]
* thread.c (update_coverage): Do not track coverage in loaded files
	  after Coverage.result. Avoids out-of-bounds access. [Bug #12237]

	* ext/coverage/coverage.c (coverage_clear_result_i): document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18 08:00:38 +00:00
naruse
0e30b44a09 merge revision(s) 54444: [Backport #12233]
* ext/date/date_core.c (Init_date_core): [DOC] fix misplaced doc
	  of DateTime.  [ruby-core:74729] [Bug #12233]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-18 07:33:56 +00:00
naruse
f74ba9cc07 merge revision(s) 54258: [Backport #12182]
* ext/openssl/extconf.rb: check SSL_CTX_set_next_proto_select_cb
	  function rather than OPENSSL_NPN_NEGOTIATED macro. it exists
	  even if it is disabled by OpenSSL configuration.
	  [ruby-core:74384] [Bug #12182]

	* ext/openssl/ossl_ssl.c: update #ifdef(s) as above.

	* test/openssl/test_ssl.rb: skip NPN tests if NPN is disabled.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-12 05:29:12 +00:00
naruse
03228aabec merge revision(s) 53722: [Backport #12232]
* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): Fix
	  Ripper.lex error in dedenting squiggly heredoc.  heredoc tree is
	  also an array of Elem in the outer tree.  [Fix GH-1234]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-01 17:08:01 +00:00
naruse
a2ed2d20cb merge revision(s) 53724: [Backport #11946]
* string.c (str_new_frozen): if the given string is embeddedable
	  but not embedded, embed a new copied string. [Bug #11946]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 16:30:10 +00:00
naruse
e34df45eba merge revision(s) 53868: [Backport #12071]
* ext/extmk.rb: add cygwin case, nothing excluded.
	  [ruby-core:73806] [Bug#12071]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 14:36:52 +00:00
naruse
2f29baf68c merge revision(s) 54097: [Backport #12069]
* ext/openssl/ossl_ssl.c (ossl_sslctx_setup): document as MT-unsafe
	  [ruby-core:73803] [Bug #12069]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 07:40:52 +00:00
naruse
3409e318f3 merge revision(s) 54022: [Backport #11893]
* ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb: fix method name typo.
	  [ruby-core:72513] [Bug #11893] The patch provided by Akira Matsuda.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 06:05:18 +00:00
naruse
dbb4fc96ff merge revision(s) 54021: [Backport #11891]
* ext/tk/lib/tkextlib/tcllib/toolbar.rb: fix method name typo.
	  [ruby-core:72511] [Bug #11891] The patch provided by Akira Matsuda.
	  [ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 06:05:05 +00:00
naruse
653b46e3ab merge revision(s) 54020: [Backport #11890]
* ext/tk/lib/tkextlib/blt/tree.rb: fix method name typo.
	[ruby-core:72510] [Bug #11890] The patch provided by Akira Matsuda.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 06:04:50 +00:00
naruse
246ffa87fd merge revision(s) 54018: [Backport #11886]
* ext/tk/lib/tk/menubar.rb: fix a typo in font name. [ruby-core:72505]
	  [Bug #11886] The patch provided by Akira Matsuda.

	* ext/tk/sample/*.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 06:04:26 +00:00
naruse
bc7dca774e merge revision(s) 54139: [Backport #12185]
* ext/socket/option.c (inspect_tcpi_msec): more accurate condition
	  for TCPI msec member inspection function.
	  [ruby-core:74388] [Bug #12185]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 06:02:25 +00:00
naruse
3c555c92f1 merge revision(s) 53677: [Backport #11877]
* ext/socket/socket.c (sock_gethostname): support unlimited size
	  hostname.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 05:50:58 +00:00
naruse
990cb712b4 merge revision(s) 53557,53561: [Backport #11958]
* ext/socket/option.c (check_size): extract a macro to check
	  binary data size, with a consistent message.

	* ext/socket/option.c (sockopt_byte): fix error message,
	  sizeof(int) differs from sizeof(unsigned char) in general.

	* ext/socket/option.c (sockopt_bool): relax boolean size to be one
	  too not only sizeof(int).  Winsock getsockopt() returns a single
	  byte as a boolean socket option.  [ruby-core:72730] [Bug #11958]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 05:16:47 +00:00
naruse
7485f74679 merge revision(s) 53435: [Backport #11945]
* ext/stringio/stringio.c (strio_binmode): implement to set encoding

	* test/stringio/test_stringio.rb (test_binmode): new test
	  [ruby-core:72699] [Bug #11945]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 05:00:42 +00:00
naruse
6b73bb455e merge revision(s) 53299: [Backport #11870]
* compile.c, cont.c, doc, man: fix common misspelling.
          [ruby-core:72466] [Bug #11870]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-29 04:49:00 +00:00
nobu
12a2e17a34 io/console: fix gem build failure on Windows
* ext/io/console/extconf.rb: fix gem build failure on Windows.
  only win32_vk.inc is included in the gem and no dependencies for
  the header, so that gperf will not be mandatory.
  [ruby-core:72453] [Bug #11866]
* ext/io/console/io-console.gemspec: include depend file and
  win32_vk header.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23 15:26:08 +00:00
nobu
f9adadc5e6 rb_readwrite_syserr_fail
* io.c (rb_readwrite_syserr_fail): works with the given errno than
  thread local errno.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23 14:58:47 +00:00
nobu
f4166e2dd7 prefer rb_syserr_fail
* file.c, io.c, util.c: prefer rb_syserr_fail with saved errno
  over setting errno then call rb_sys_fail, not to be clobbered
  potentially and to reduce thread local errno accesses.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-23 08:57:48 +00:00
normal
1abef5bd11 ext/socket/init.c (rsock_init_sock): reject reserved FDs
[ruby-core:72445] [Bug #11862]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 22:28:31 +00:00
nobu
52c3b2eb2a io-console.gemspec: BSD-2-Clause
* ext/io/console/io-console.gemspec: change the license to
  BSD-2-Clause since "ruby" is no longer valid license as gem.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 13:56:34 +00:00
naruse
4eac2e833c fix r53231: raise Errno::EBADF like other OSes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 13:45:14 +00:00
nobu
3f90a4ae1e io-console.gemspec: bump up
* ext/io/console/io-console.gemspec: bump up to 0.4.4.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 13:15:11 +00:00
mrkn
d9bddfda03 * ext/bigdecimal/bigdecimal.gemspec: bump version to 1.2.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 12:20:28 +00:00
hsbt
618035b531 * ext/psych/lib/psych.rb: bump version to 2.0.17
* ext/psych/psych.gemspec: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 11:25:39 +00:00
nobu
10a129cee7 escape.c: should not freeze
* ext/cgi/escape/escape.c (optimized_escape_html): CGI.escapeHTML
  should return unfrozen new string.
  [ruby-core:72426] [Bug #11858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 05:31:31 +00:00
nobu
1b107d48ef escape.c: Preserve original state
* ext/cgi/escape/escape.c (preserve_original_state): Preserve
  original state for tainted and frozen.  [Fix GH-1166]
  [ruby-dev:49451] [Bug #11855]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-21 20:40:02 +00:00
normal
409e53dec1 avoid rb_bug on BasicSocket.for_fd(-1)
* ext/socket/init.c (rsock_init_sock): check FD after validating
* test/socket/test_basicsocket.rb (test_for_fd): new
  [ruby-core:72418] [Bug #11854]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-21 18:57:50 +00:00
nobu
c17e9e077c NotImplementedError typo
* ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLSocket): fix
  NotImplementedError typo.  [Fix GH-1165]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-21 00:33:20 +00:00
nobu
ce7f7f5e3d cgi/escape: Optimize CGI.escapeHTML
* cgi/escape/escape.c: Optimize CGI.escapeHTML for
  ASCII-compatible encodings.  [Fix GH-1164]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20 11:54:54 +00:00
nobu
26bc97bda4 zlib.c: Fix typo [ci skip]
* ext/zlib/zlib.c (Init_zlib): [DOC] Fix double-word typo and
  grammatical error.  [Fix GH-1162]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-19 05:27:52 +00:00
nobu
3e1c01ae46 stringio.c: separate encoding from buffer
* ext/stringio/stringio.c (strio_set_encoding): add StringIO's own
  encoding and separate it from the buffer string to override the
  encoding of string when reading.  [ruby-core:72189] [Bug #11827]
  note that setting the encoding of its buffer string may cause
  unpredictable behavior.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 07:54:33 +00:00
nobu
21973c01ab stringio.c: strio_unget_bytes
* ext/stringio/stringio.c (strio_unget_bytes): extract from
  strio_ungetbyte to share with strio_ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 06:40:00 +00:00
nobu
b7d1536991 stringio.c: padding in ungetbyte
* ext/stringio/stringio.c (strio_ungetbyte): pad with \000 when
  the current position is after the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 03:09:16 +00:00
hsbt
b1a658e827 * ext/pty/pty.c: fix double words typo.
[ci skip][fix GH-1157] Patch by @jwworth

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 00:44:52 +00:00
hsbt
7d8290811e * ext/nkf/nkf-utf8/utf8tbl.c: fix a typo.
[ci skip][fix GH-1159] Patch by @akshay-vishnoi
* ext/nkf/nkf-utf8/utf8tbl.h: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18 00:42:49 +00:00
nagachika
79c7a51893 * ext/fiddle/handle.c: check tainted string arguments.
Patch provided by tenderlove and nobu.

* test/fiddle/test_handle.rb (class TestHandle): add test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 12:08:49 +00:00
naruse
c4fdfabcc8 handle ext/ as r53141
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts
fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&#
frozen_string_literal: false\n");f.rewind;f.write s}}'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:31:54 +00:00