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

9785 Коммитов

Автор SHA1 Сообщение Дата
nobu c373866444 escape.c: check argument
* ext/cgi/escape/escape.c (optimized_unescape): check
  accept_charset encoding argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:02:36 +00:00
nobu 7d0d0d5864 test_cgi_util.rb: encoding tests
* test/cgi/test_cgi_util.rb (test_cgi_unescape): \u is useless on
  old versions.

* test/cgi/test_cgi_util.rb (test_cgi_include_unescape): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 07:03:59 +00:00
nobu 57b6d6032c test_iseq_load.rb: refine test_require_integration
* test/-ext-/iseq_load/test_iseq_load.rb (test_require_integration):
  assert with diff.

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 05:43:58 +00:00
nobu ab6a38c9e5 test_time.rb: use UTC
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): fix
  failure due to timezone offset.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01 22:18:28 +00:00
nobu 1a0eaede42 test_queue.rb: fix portability
* test/thread/test_queue.rb (test_queue_with_trap): fix
  portability.  use SIGINT instead of SIGUSR2 which is supported
  on not all platforms.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01 22:14:22 +00:00
tenderlove ef76e3cfb6 Add IMEMO type to heap dump output.
IMEMO objects have many types.  Without this change, we cannot see what
types of IMEMO objects are being used when dumping the heap.  Adding the
type to the IMEMO object will allow us to gather statistics about IMEMO
objects being used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 17:46:51 +00:00
rhe 8795838fcb openssl: import v2.0.3
Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since
2.0.2 (imported at r57146) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3

----------------------------------------------------------------
Corey Bonnell (1):
      Fix for ASN1::Constructive 'each' implementation

Kazuki Yamaguchi (10):
      Fix build with static OpenSSL libraries on Windows
       ([ruby-core:78878] [Bug #13080])
      Merge pull request #96 from CBonnell/master
      Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
      appveyor.yml: update OpenSSL version to 1.0.2j
      buffering: fix typo in doc
      test/envutil: fix assert_raise_with_message
      x509: fix OpenSSL::X509::Name#eql?
       ([ruby-core:79310] [Bug #13170])
      ruby-openssl-docker: update versions of Ruby and OpenSSL
      .travis.yml: test with Ruby 2.4
      Ruby/OpenSSL 2.0.3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 10:08:22 +00:00
ko1 bfdfc99cc2 allow Queue operation in trap.
* thread_sync.c: allow spurious wakeup to check Queue status just after trap.
  [Bug #12405]

* test/thread/test_queue.rb: add a test for it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 07:00:38 +00:00
normal 9b69e9fafc time.c (time_strftime): avoid garbage in common case
strftime format strings which are dynamically-generated will benefit
from avoiding garbage, here.

* time.c (time_strftime): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 02:18:58 +00:00
nobu bef93a2ddf test_io.rb: separate a test
* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a
  separated process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 01:18:10 +00:00
normal ba5aa60668 sprintf.c: avoid garbage in common (no exception) case
Format strings which are dynamically-generated will benefit
from this.  This won't cover exceptions, but exceptions for
sprintf should be too uncommon to care about (unlike IO)

* sprintf.c (rb_str_format): use rb_str_tmp_frozen_{acquire,release}
* test/ruby/test_sprintf.rb (test_no_hidden_garbage): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31 00:41:56 +00:00
normal 4b9a21cdd6 io.c (rb_io_syswrite): avoid leaving garbage after write
As with IO#write, IO#syswrite also generates garbage which can
be harmful in hand-coded read-write loops.

* io.c (swrite_arg, swrite_do, swrite_end): new
  (rb_io_syswrite): use new functions to cleanup garbage
  [ruby-core:78898] [Bug #13085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 22:03:57 +00:00
normal 5c988df0dd string.c (rb_str_tmp_frozen_release): release embedded strings
Handle the embedded case first, since we may have an embedded
duplicate and non-embedded original string.

* string.c (rb_str_tmp_frozen_release): handled embedded strings
* test/ruby/test_io.rb (test_write_no_garbage): new test
  [ruby-core:78898] [Bug #13085]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 21:54:32 +00:00
shyouhei 8ad7429644 make FIXNUM_MAX visible from Ruby
Because our tests now have several places where FIXNUM_MAX is needed,
we decided to provide it along with several other constants.

	* template/limits.c.tmpl: new file, defining RbConfig::Limits

	* ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c

	* test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits

	* bootstraptest/test_insns.rb: ditto.

	* .gitignore: ignore new generated file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 10:12:18 +00:00
nobu 6cc463cac9 reduce iterations for slower machines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 05:09:13 +00:00
nobu 9b0118a84c refine assertions
* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by
  FIXME comments.  adjust line numbers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 04:47:44 +00:00
nobu d617fce9ab more checks for prompt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 03:57:46 +00:00
nobu 5a48f20c33 test for prompt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30 03:21:15 +00:00
nobu 62acbb9805 test for immature statement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:53:24 +00:00
nobu 1997f7807b test for top level statement
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:53:23 +00:00
nobu 3abb4948b2 test for comment
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 12:20:26 +00:00
nobu 25ad4a7907 tests for irb lexer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 09:51:55 +00:00
kazu b9d8758e26 {ext,test}/etc: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-29 01:35:23 +00:00
nobu 1127a366fd test/unit.rb: minimum workers
* test/lib/test/unit.rb (_run_parallel): launch only necessary
  workers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 11:27:32 +00:00
kazu 886e805799 {ext,test}/dbm: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 04:36:08 +00:00
nobu 640bcdf217 leakchecker.rb: get rid of uninitialized Tempfile
* test/lib/leakchecker.rb (LeakChecker#find_tempfiles): get rid of
  errors on uninitialized Tempfile, which can be left when
  Dir.tmpdir failed or by Tempfile.allocate.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 05:01:18 +00:00
kazu 8edb6ce4f7 {ext,test}/date: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-27 00:29:21 +00:00
kazu e7cc39008e lib/weakref.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-26 15:14:00 +00:00
nobu 61701ae167 io.c: close before wait
* io.c (io_close_fptr): notify then close, and wait for other
  threads before free fptr.  [ruby-core:79262] [Bug #13158]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-25 14:34:07 +00:00
nobu 54fa9f9e13 eval.c: copy special exception
* eval.c (setup_exception): make unfrozen copy of special
  exception before setting up a cause.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 14:52:07 +00:00
svn e22aa95141 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 02:38:58 +00:00
hsbt 5d43821536 Update Rubygems 2.6.10
* 2ee5bf9fd3
 * be510dd409

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-24 02:38:57 +00:00
kazu 0c9e2cf264 test/test_tmpdir.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 15:47:32 +00:00
nobu 11e6bd5ac2 object.c: no TypeError at Symbol
* object.c (special_object_p): uninterned Symbol also should not
  raise a TypeError but return itself instead, as well as interned
  Symbols.  [ruby-core:79216] [Bug #13145]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 06:16:04 +00:00
nobu 5bb125c63e csv.rb: fix field_size_limit check
* lib/csv.rb (CSV#shift): the last column is an Array in extended
  column since r55985.  [ruby-dev:49964] [Bug #13149]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-23 05:59:28 +00:00
kazu 562bbdf995 lib/tempfile.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-21 12:21:05 +00:00
shyouhei abae70d6ed SecureRandom should try /dev/urandom first [Bug #9569]
* random.c (InitVM_Random): rename Random.raw_seed to
	  Random.urandom.  A quick search seems there are no practical use
	  of this method than securerandom.rb so I think it's OK to rename
	  but if there are users of it, this hunk is subject to revert.

	* test/ruby/test_rand.rb (TestRand#test_urandom): test for it.

	* lib/securerandom.rb (SecureRandom.gen_random): Prefer OS-
	  provided CSPRNG if available. Otherwise falls back to OpenSSL.
	  Current preference is:

	  1. CSPRNG routine that the OS has; one of
	     - getrandom(2),
	     - arc4random(3), or
	     - CryptGenRandom()
	  2. /dev/urandom device
	  3. OpenSSL's RAND_bytes(3)

	  If none of above random number generators are available, you
	  cannot use this module.  An exception is raised that case.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-20 08:00:00 +00:00
nobu 0ec889d7ed parse.y: rescue/else/ensure in do-end
* parse.y (do_body): allow rescue/else/ensure inside do/end
  blocks.  [Feature #12906]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 09:54:58 +00:00
shugo d33726b837 string.c: rindex(//) should set $~.
This seems a bug introduced by r520 (1.4.0).  [ruby-core:79110] [Bug #13135]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 08:13:03 +00:00
nobu af9a151f0b parse.y: chomp by -l
* parse.y (rb_parser_while_loop): should chomp but not chop by -l
  option.  [ruby-core:78099] [Bug #12926]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-19 07:18:23 +00:00
nobu b38823ceca vm_method.c: resolve refined method to undef
* vm_method.c (rb_undef): resolve the method entry which refines a
  prepended method entry.  [ruby-core:78944] [Bug #13096]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18 05:23:53 +00:00
nobu 13dffd8a2a class.c: non-keyword hash class
* class.c (rb_extract_keywords): keep the class of non-keyword
  elements hash as the original.  [ruby-core:77813] [Bug #12884]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-18 03:38:52 +00:00
nobu 556e3da421 uri/generic.rb: fix exception on non-IP format
* lib/uri/generic.rb (URI::Generic#find_proxy): match IP address
  no_proxy against resolved self IP address.  [Fix GH-1513]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-17 12:54:35 +00:00
kazu 2a9dd6b818 lib/pstore.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-17 12:47:38 +00:00
kazu 8e0ff63f22 Fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16 12:37:42 +00:00
nobu 4c02194216 test_rational.rb: messages
* test/ruby/test_rational.rb (test_parse): add messages to
  assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-16 02:56:28 +00:00
nobu 3408e9e3c3 revert r57323
StringIO.new makes the buffer IO.default_external, while
StringIO.new("".dup) makes source encoding which is defaulted to
UTF-8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14 09:38:56 +00:00
nobu 2b2450ba4b Made #decode_rdata client to catch errors
* lib/resolv.rb (Resolv::DNS::Message::MessageDecoder#get_rr):
  re-raise an exception from decode_rdata as DecodeError, so it
  can report them to the top in more informative way.  It was not
  reflecting on errors of data and thus breaking.  Client code
  expects `DecodeError` and knows how to handle broken messages.
  [Fix GH-1511]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14 02:26:48 +00:00
nobu c8a4b57254 StringIO.new makes a RW buffer
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-14 02:06:22 +00:00
kazu 82f61a1336 lib/observer.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 12:08:29 +00:00
nobu c2c0157040 error.c: moved
* error.c (preface_dump, postscript_dump): CrashReporter directory
  was used before Mac OS X 10.6.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 03:24:22 +00:00
nobu 81cb9aa574 error.c: moved
* error.c (preface_dump, postscript_dump): moved from
  rb_vm_bugreport to place the last important message at the very
  last after [NOTE].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 02:57:45 +00:00
kazu 6ca3028eec lib/net/smtp.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-12 12:17:33 +00:00
nobu 14a730e91e immediate message mode of compile error
* compile.c (append_compile_error): set Qtrue for erred state with
  showing the message immediately.

* iseq.c (prepare_iseq_build): make immediate message mode if main
  or top level context, not to show the failed path twice in the
  first line.

* iseq.c (cleanup_iseq_build): raise default message exception if
  immediate message mode.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-12 07:41:35 +00:00
shugo 58935eb8bd lib/net/protocol.rb: preserve backtrace information
BufferedIO#rbuf_fill should preserve backtrace information when raising
EOFError.  Otherwise, users get confused when EOFError is leaked out from
Net::SMTP etc.  [ruby-core:78550] [Bug #13018]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-12 02:19:17 +00:00
normal d9421e1376 test/rinda/test_rinda: skip multicast tests for unsupported systems
This allows "test-all" to pass on systems without multicast
support.  I leave CONFIG_IP_MULTICAST unset in my Linux kernel
.config, nowadays.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 23:53:05 +00:00
normal 5c244d73d7 test/fiddle/helper: remove special case for x86_64-linux
RUBY_PLATFORM is "x86_64-linux" on a 32-bit (x86) Ruby built and
running on a 64-bit Linux kernel.  I also have a /lib64
directory nowadays because I just installed multi-arch support
in userspace.  So, fall back to loading based in the size of a
packed "unsigned long" type instead of special-casing.

Tested with both x86 and x86_64 userspace on 64-bit Linux kernel,
as well as x86 with a 32-bit Linux kernel.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 23:46:05 +00:00
kazu 3e34d8a44f lib/net/protocol.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 14:48:51 +00:00
nobu 9029464175 string.c: replacement and block
* string.c (rb_enc_str_scrub): only one of replacement and block
  is allowed.  [ruby-core:79038] [Bug #13119]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 02:31:02 +00:00
nobu a3aa4da773 string.c: yield invalid part
* string.c (rb_enc_str_scrub): yield the invalid part only with
  ASCII-incompatible.  [ruby-core:79039] [Bug #13120]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 02:18:45 +00:00
nobu c763f0fb9b string.c: block for scrub with ASCII-incompatible
* string.c (rb_enc_str_scrub): honor the given block with
  ASCII-incompatible encoding.  [ruby-core:79039] [Bug #13120]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 01:03:37 +00:00
nobu 52b02ad22a compile.c: check compile
* compile.c (iseq_compile_each): check if sub nodes succeeded.
  [ruby-core:76531] [Bug #12613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 15:28:11 +00:00
kazu 1dd076c557 lib/net/pop.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 12:32:56 +00:00
nobu 868700a7a6 test_io_console.rb: fix of old CentOS5
* test/io/console/test_io_console.rb (test_winsize): on old CentOS5
  window size seems unable to be set across a pty.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 04:04:29 +00:00
nobu b4a55c1cad console.c: unpaired size
* ext/io/console/console.c (console_set_winsize): reject unpaired
  pixel size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 23:02:29 +00:00
nobu 5b856ee1a6 console.c: OOB access
* ext/io/console/console.c (console_set_winsize): fix
  out-of-bounds access.  [ruby-core:79004] [Bug #13112]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 22:52:03 +00:00
eregon ac9f8145f1 fix optimization for hash aset/aref with fstring
Patch by Eric Wong [ruby-core:78797].
I don't like the idea of making insns.def any bigger to support
a corner case, and "test_hash_aref_fstring_identity" shows
how contrived this is.

[ruby-core:78783] [Bug #12855]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 11:31:53 +00:00
kazu 9144d57b94 lib/fileutils.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 02:14:07 +00:00
nobu 93824a5f73 test_io.rb: squiggly heredoc
* test/ruby/test_io.rb (test_threaded_flush): use squiggly here
  document to strip leading spaces.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-06 03:02:38 +00:00
kazu 761dd9a778 lib/delegate.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-06 02:05:35 +00:00
kazu aa5ff4a43a lib/cmath.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 05:47:52 +00:00
nobu 2c1aa78820 adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-04 00:30:45 +00:00
tenderlove ed2abc4362 Add `full` option to `ObjectSpace.dump_all`
The `full` option includes all slots (even `T_NONE`) in the JSON output.
This is to help with debugging heap fragmentation.

Here is an example usage:

```ruby
File.open('heap.json', 'w') do |f|
  ObjectSpace.dump_all(output: f, full: true)
end
```

The `heap.json` file contains all slots, including empty slots.

[Feature #13001] [ruby-core:78468]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-03 22:42:10 +00:00
kazu aa710736b4 lib/benchmark.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-03 02:00:01 +00:00
nobu 9df88e9cae test for [Feature #11547]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-01 09:17:10 +00:00
nobu 46454b5ee6 passed block should keep the lambda-ness
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-01 08:22:02 +00:00
nobu 91587f6b63 vm.c: fix return in lambda
* vm.c (invoke_block_from_c_splattable): pass lambda-ness.

* vm_eval.c (yield_under): invoke lambda proc properly.
  [ruby-core:78917] [Bug #13090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-31 08:07:58 +00:00
nobu 994d13b98f rational.c: memory leak in gcd
* rational.c (rb_gcd_gmp): fix memory leak.  patched by KISHIMOTO,
  Makoto <ksmakoto AT dd.iij4u.or.jp> in [ruby-dev:49934].
  [Bug #13089]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-30 08:01:34 +00:00
rhe c326ab8c74 test/ruby/test_pack.rb: fix test case added by r57187
The test case for String#unpack added by r57187 is not properly testing
because the String will be filled after the block invocation.
[ruby-core:78841] [Bug #13075]

Thanks to nagachika for pointing this out:

  http://d.hatena.ne.jp/nagachika/20161226/ruby_trunk_changes_57184_57194#r57187

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-29 16:16:32 +00:00
nobu ff93ad62bd rational.c: fix for mathn
* rational.c (read_num, read_rat_nos): dispatch by the type of numerator, for
  mathn.  [ruby-core:78893] [Bug #13084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-29 09:26:45 +00:00
nobu 1778ed59e7 numeric.c: reduce fdiv
* numeric.c (rb_int_fdiv_double): reduce first for more precise
  result.  [ruby-core:78886] [Bug #13078]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-28 04:40:58 +00:00
nobu 2fbc63b8a8 io.c: ARGF fd leak
* io.c (argf_next_argv): fix leak of fd after breaking in #each
  method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-27 07:18:27 +00:00
nobu 08ca33e98c io.c: fix race between read and close
* io.c (io_fillbuf): fix race between read and close, in the case
  the IO gets closed before the reading thread achieve the lock.
  [ruby-core:78845] [Bug #13076]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26 14:14:18 +00:00
nobu b4aa884f06 parse.y: preserve cmdarg stack
* parse.y (do_body): preserve cmdarg stack around do/end block.
  [ruby-core:78837] [Bug #13073]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26 13:31:03 +00:00
nobu af2670f1a4 vm_eval.c: Symbol#to_proc and instance_exec
* vm_eval.c (yield_under): should evaluate the proc on the first
  argument.  [ruby-core:78839] [Bug #13074]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26 10:00:36 +00:00
nobu bb7b5a0631 test/ruby/test_symbol.rb: use begin;end; hack
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26 10:00:34 +00:00
rhe b65b41861f pack.c: avoid returning uninitialized String
Fix unpacking with 'b', 'B', 'h' and 'H' format. Do not return an
uninitialized String to Ruby before filling the content bytes.
Fixes r11175 ("pack.c (pack_unpack): execute block if given with
unpacked value instead of creating an array", 2006-10-15).
[ruby-core:78841] [Bug #13075]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-26 06:32:00 +00:00
nobu 10bd48e402 string.c: CRLF in paragraph mode
* string.c (rb_str_enumerate_lines): allow CRLF to separate
  paragraphs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-25 23:56:55 +00:00
nobu 091f99b4b9 string.c: consistent paragraph mode with IO
* string.c (rb_str_enumerate_lines): in paragraph mode, do not
  include newlines which separate paragraphs, so that it will be
  consistent with IO#each_line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-25 23:50:09 +00:00
nobu e4aac80a71 test/unit.rb: restore parallel option
* test/lib/test/unit.rb (_run_parallel): restore parallel option
  after retrying for --repeat-count option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 09:22:21 +00:00
nobu 52acc428f0 test/unit.rb: --subprocess-timeout-scale option
* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess
  timeout scaling factor.

* test/lib/test/unit.rb (Test::Unit::SubprocessOption): add
  --subprocess-timeout-scale option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:51:01 +00:00
nobu 642b3a260b test/unit.rb: --repeat-count option
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count
  option to repeat COUNT times while success.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24 00:50:59 +00:00
naruse dea8ea61ea Increase timeout
http://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20161223T113301Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 14:54:04 +00:00
nobu 2af72edd72 assertions.rb: prepare_syntax_check
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract
  common preparation of arguments from assert_valid_syntax and
  assert_syntax_error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:36 +00:00
nobu 6b5f927718 assertions.rb: syntax check by iseq
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use
  RubyVM::InstructionSequence.compile to get rid of executing the
  code, instead of catch&throw.  sample/trick2015/kinaba/entry.rb
  no longer raises an Invalid return.

* test/lib/test/unit/assertions.rb (assert_syntax_error): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23 03:22:35 +00:00
nobu 1c16a35017 test_modify_expand.rb: skip if no overflow
* test/-ext-/string/test_modify_expand.rb (test_integer_overflow):
  no longer happens on platforms where size_t is larger than long,
  e.g. 64bit windows, since r57122.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 23:20:00 +00:00
yui-knk 2a6727b566 test_float.rb: add test cases for Float#round
* test_float.rb: add test cases for Float#round with
  half nil. Follow up r57130.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 10:29:40 +00:00
nobu c83f23ad52 test_rinda.rb: ipv6_mc
* test/rinda/test_rinda.rb (RingIPv6#ipv6_mc): extract IPv6
  multicast setup and cleanup, and ignore ENETDOWN.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-22 02:00:02 +00:00
mrkn bd288dcc8b bigdecimal: version 1.3.0
Import bigdecimal version 1.3.0.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre.2...v1.3.0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 15:35:29 +00:00
nobu 5518b5c21a time.c: refine num_exact error message
* time.c (num_exact): show the original argument when conversion
  failed, instead of intermediate nil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 12:06:40 +00:00
nobu 1729243bba eval.c: fix circular cause
* eval.c (exc_setup_cause): always set cause of cause to get rid
  of circular references.  [ruby-core:78688] [Bug #13043]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 11:12:39 +00:00
nobu 342f10b9b3 compile.c: toplevel return
* compile.c (iseq_compile_each): stop execution of the current source
  by toplevel return.  [ruby-core:36785] [Feature #4840]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 01:58:32 +00:00
nobu 114d1751dc numeric.c: allow nil as rounding mode option
* numeric.c (rb_num_get_rounding_option): allow nil same as the
  default behavior, per [ruby-core:77961].  [Bug #12548]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21 01:29:57 +00:00
naruse f3d0c2729a suppress warning: attempt to close unfinished zstream; reset forced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:22 +00:00
naruse ba568c0ea3 Zlib.gzip uses kwargs instead of argc [Feature #13020]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 16:02:21 +00:00
nobu 1cc9c93ff9 io.c: update argf lineno
* io.c (argf_rewind): rewind line number in non-global ARGF
  instance.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 08:25:03 +00:00
nobu 9b6e1a9f38 io.c: update argf lineno
* io.c (argf_block_call_line): update line number in non-global
  ARGF instance.  [ruby-core:78728] [Bug #13051]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 08:25:02 +00:00
rhe dc2d359b70 re.c: consider the case of RMatch::regexp is nil
Follow r49675, r57098 and r57110. Don't assume RMatch::regexp always
contains a valid Regexp instance; it will be Qnil if the MatchData is
created by rb_backref_set_string().  [ruby-core:78741] [Bug #13054]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 07:32:23 +00:00
rhe b5da45d6d7 array.c: do not resize to less than 0
Shrinking the Array from the block invoked by Array#select! or
Array#reject! causes the Array to be a negative number size. Ensure that
the resulting Array won't be smaller than 0.
[ruby-core:78739] [Bug #13053]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 06:53:44 +00:00
rhe 647ba111ea array.c: check array length every time after yielding
Since the Array may be modified during rb_yield(), the length before
invoking the block can't be trusted. Fix possible out-of-bounds read in
Array#combination and Array#repeated_combination.

It may better to make a defensive copy of the Array, but for now let's
follow what Array#permutation does.  [ruby-core:78738] [Bug #13052]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 05:26:08 +00:00
nobu 8c5e6ba015 test/unit.rb: separator [ci skip]
* test/lib/test/unit.rb (ExcludesOption#setup_options): add
  separator for --excludes-dir in help message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20 05:09:18 +00:00
naruse 86f229ec32 Increase timeout
http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161215T021909Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-18 11:28:01 +00:00
nobu 0854193a68 sprintf.c: fix width underflow
* sprintf.c (rb_str_format): fix memory corruption by width
  underflow.  https://github.com/mruby/mruby/issues/3347

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-17 18:04:30 +00:00
naruse f5b1f76025 Increase timeout
http://rubyci.org/logs/13.78.52.201/vc12-x64/ruby-trunk/log/20161217T103523Z.log.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-17 16:10:56 +00:00
nobu ba71a68732 test_mailto.rb: overwritten methods
* test/uri/test_mailto.rb (URI::TestMailTo#test_to_mailtext):
  merge overwritten methods.  [Bug #10774]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-17 00:58:47 +00:00
nobu a37cc2d4d8 test_mailto.rb: adjust scope
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-17 00:58:46 +00:00
nobu 7f4dc81717 re.c: non-regexp name reference
* re.c (rb_reg_regsub): other than regexp has no name references.
  [ruby-core:78686] [Bug #13042]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-17 00:52:47 +00:00
nobu d25faa4ed2 multiline heredoc identifier
* parse.y (parser_heredoc_identifier): reject multiline here
  document identifier, which never matches single line.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-16 01:27:47 +00:00
nobu 75755ef159 fix chomping newline only line
* string.c (chomp_newline): fix chomping newline only line.
  rb_enc_prev_char return NULL if no previous character and must
  not call rb_enc_ascget on it.  a patch by Ary Borenszweig
  <asterite AT gmail.com> at [ruby-core:78666].  [Bug #13037]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-16 01:12:09 +00:00
nobu 2d6538a7c8 parse.y: newline in heredoc identifier
* parse.y (parser_heredoc_identifier): warn newline in here
  document identifier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-15 12:58:59 +00:00
usa 836794f206 Removed the obstacle to running test-all with VC14.
* test/fiddle/test_import.rb (LIBC.fprintf): VC14's `fprintf` is very distinct
  name, then, just ignore this test.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14 17:53:20 +00:00
rhe 201972ac4c encoding.c: handle needmore error from rb_enc_precise_mbclen()
rb_enc_ascget() erroneously reports success even if the given byte
sequence is incomplete, for non-ASCII compatible encoding strings.

rb_enc_precise_mbclen() may return a negative value on error, and thus
rb_enc_ascget() must not store the return value in 'unsigned int';
otherwise the subsequent MBCLEN_CHARFOUND_P() check won't catch the
error.  [ruby-core:78646] [Bug #13034]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14 12:32:42 +00:00
nobu bc44acb5a3 parse.y: fix yyerror message
* parse.y (parser_yyerror): show the error line even if the error
  is at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-14 04:35:28 +00:00
naruse 6c0aece53d Use URI.decode_www_form_component [Bug #10774]
`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12 15:24:28 +00:00
nobu 9f3798549d test for Symbol#match? [Feature #12898]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12 03:19:52 +00:00
nobu e2583b17b9 test_m17n.rb: escape
* test/ruby/test_m17n.rb (test_regexp_ascii_none): escape regexp
  meta characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12 03:07:47 +00:00
nobu 6dd5ee752a String#match? and Symbol#match?
* string.c (rb_str_match_m_p): inverse of Regexp#match?.  based on
  the patch by Herwin Weststrate <herwin@snt.utwente.nl>.
  [Fix GH-1483] [Feature #12898]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12 02:56:12 +00:00
nobu 2800e6a0a4 re.c: char boundary
* re.c (rb_reg_match_m_p): consider char boundary.  rb_str_subpos
  does not adjust to the boundary if len == 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-12 02:38:53 +00:00
nobu 7e8b910a56 parse.y: zero codepoints
* parse.y (parser_tokadd_utf8): relax restriction to allow zero or
  more codepoints.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-11 09:20:27 +00:00
mrkn 42a677c895 bigdecimal: version 1.3.0.pre.2
Import bigdecimal version 1.3.0.pre.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.0.pre...v1.3.0.pre.2

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:56:05 +00:00
nobu 30540c5675 stringio.c: chomp CR
* ext/stringio/stringio.c (strio_getline): chomp CR not only LF,
  as well as String#chomp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:54:40 +00:00
nobu f46a137746 zlib.c: replace with substring
* ext/zlib/zlib.c (zstream_discard_input): replace with unread
  portion substring, not modifying the input buffer directly.
  [ruby-core:78567] [Bug #13021]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:26:40 +00:00
rhe 0c83666c6c openssl: import v2.0.1
Import Ruby/OpenSSL 2.0.1. The full commit history since 2.0.0 (imported
at r56946) can be found at:

  https://github.com/ruby/openssl/compare/v2.0.0...v2.0.1

This release contains only bug fixes. Note, the first two commits since
v2.0.0 are already imported at r56953 to make Travis and RubyCI green.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 08:12:02 +00:00
mrkn 8e1293730e bigdecimal: import version 1.3.0.pre
Import bigdecimal version 1.3.0.pre.  The full commit log of this
changes can be found at:

    https://github.com/ruby/bigdecimal/compare/5c43a9e...v1.3.0.pre

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 07:49:15 +00:00
mrkn f72be814d9 internal.h: change the default rounding mode to half-up
* internal.h (ROUND_DEFAULT): changed to RUBY_NUM_ROUND_HALF_UP.
  [Bug #12958] [ruby-core:78204]

* test/ruby/test_integer.rb: fix assertions for the above change.

* test/ruby/test_rational.rb: ditto.

* test/test_mathn.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10 02:36:16 +00:00
naruse 583b6dc33c Zlib.gzip and Zlib.gunzip [Feature #13020]
Encode and Decode gzip data without creating files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-09 22:45:39 +00:00
nobu 18c9bf5de3 test/unit.rb: fix -n option
* test/lib/test/unit.rb (non_options): turn name patterns into
  Regexps.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08 08:25:21 +00:00
nobu 05f891cbbb vm.c: check type of hash to merge
* vm.c (core_hash_merge): check the type of the target hash to
  merge.  [ruby-core:78536] [Bug #13015]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08 06:19:06 +00:00
nobu 7bbab207cb vm_insnhelper.c: zsuper in refinements
* vm_insnhelper.c (vm_call_zsuper): prevent infinite recursion
  zsuper in refinements.  [ruby-core:77161] [Bug #12729]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08 05:16:33 +00:00
nobu 510f0ec869 parse.y: ripper generic input
* parse.y (ripper_initialize): allow generic input as source, if
  it has #gets method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08 00:45:13 +00:00
nobu c9530982b6 assertions.rb: defered message in FailDesc
* test/lib/test/unit/assertions.rb (FailDesc): allow to defer
  message generation, as well as other assertion methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 14:26:44 +00:00
shugo 03ec739729 Delay Utils.getservername until needed.
There is no need to call Utils.getservername when the :ServerName option is
specified, so delay Utils.getservername until needed to avoid unnecessary
DNS lookups.  [ruby-core:78492] [Bug #13007]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 12:59:48 +00:00
shugo f4b51e69dc Extend timeout for Solaris unstable10s.
http://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20161206T181910Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 02:41:00 +00:00
nobu 7eb8d74f34 file.c: cygwin behavior
* file.c: recent cygwin hides NTFS specific features.
  [ruby-core:78497] [Bug #13008]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07 02:19:29 +00:00
kou b23eac6958 rexml: REXML::Element#[] accepts String or Symbol as attribute name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 13:57:56 +00:00
mrkn 48f5f5915b array.c, enum.c: change sum algorithm
* array.c (rb_ary_sum): change the algorithm to Kahan-Babuska balancing
  summation to be more precise.
  [Feature #12871] [ruby-core:77771]

* enum.c (sum_iter, enum_sum): ditto.

* test_array.rb, test_enum.rb: add an assertion for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 13:40:31 +00:00
mrkn 0cb1a2b812 numeric.c: fix exception message for nil rounding
* numeric.c (rb_num_get_rounding_option): fix exception message
  for the case of nil rounding mode.

* test_float.rb: add an assertion for the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 12:54:19 +00:00
kazu a560add68a Fix typos
Patch by: Koichi ITO <koic.ito@gmail.com>
[Fix GH-1498]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 12:49:46 +00:00
nobu 2b5287d3e8 EPERM by symlink
* test/ruby/test_file.rb (test_realpath_encoding): EPERM can raise
  on cygwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 07:46:14 +00:00
nobu a8fff36406 EPERM by symlink
* test/ruby/test_file_exhaustive.rb (symlinkfile): EPERM can raise
  on cygwin.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-06 06:16:57 +00:00