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

44455 Коммитов

Автор SHA1 Сообщение Дата
nobu a38b2f84f4 iseq.c: syntax error in compile_file
* iseq.c (iseqw_s_compile_file): deal with syntax error as well as
  compile, and should not abort when rescued.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 08:35:31 +00:00
nobu 2ca58e4290 assertions.rb: success option
* test/lib/test/unit/assertions.rb (assert_in_out_err): add
  success option to check the exit status.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 08:35:30 +00:00
nobu b15f76556f iseq.c: kwarg to compile
* iseq.c (iseqw_s_compile, iseqw_s_compile_file): allow keyword
  arguments as the options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 06:23:36 +00:00
nobu 802e5677a4 iseq.c: file name encoding
* iseq.c (iseqw_s_compile): keep the encoding of file name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 05:34:41 +00:00
nobu eb937455f2 ChangeLog: remove extra line
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 05:26:26 +00:00
kazu 17901bbcd3 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 03:50:41 +00:00
naruse 5f33c6b0f5 * lib/cgi/cookie.rb (parse): don't allow , as a separator. [Bug #12791]
* lib/webrick/cookie.rb (parse): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27 03:17:47 +00:00
svn f0137ba8cd * 2016-09-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 21:12:13 +00:00
headius fbaa823344 * test/ripper/test_ripper.rb: add a test for dedent_string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 21:12:12 +00:00
knu c2e59df31b Remove Ns before puctuation
* man/erb.1, man/irb.1, man/ri.1, man/ruby.1: Remove Ns before
  puctuation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 12:39:18 +00:00
nobu 91a32fc030 test_exception.rb: another assertion
* test/ruby/test_exception.rb (test_throw_false): test the thrown
  tag.  [Bug #12743]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 07:33:16 +00:00
rhe e6e66094f9 stringio.c: fix signed integer overflow
* ext/stringio/stringio.c (strio_seek): Avoid signed integer overflow.
  It's not harmful in practice here, but is still undefined behavior.

* ext/stringio/stringio.c (strio_extend): Check that the new length does
  not exceed LONG_MAX. This fixes the invalid write on the overflow.

* test/stringio/test_stringio.rb (test_write_integer_overflow): Add a
  test case for the above fix in strio_extend().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 07:24:55 +00:00
rhe ed5a926b13 eval_intern.h: make TH_PUSH_TAG() initialize rb_vm_tag::tag with Qundef
* eval_intern.h (TH_PUSH_TAG): Initialize struct rb_vm_tag::tag with
  Qundef rather than 0 which is equal to Qfalse. Since Kernel#throw(obj)
  searches a tag with rb_vm_tag::tag == obj, throw(false) can
  accidentally find an unrelated tag which is not created by
  Kernel#catch.  [ruby-core:77229] [Bug #12743]

* test/ruby/test_exception.rb (test_throw_false): Add a test case for
  this.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 06:43:51 +00:00
sonots 64f53f0dbf * lib/tempfile.rb: provide default basename parameter
for Tempfile.create. [Feature #11965] Patch by Yuki Kurihara
* test/test_tempfile.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 05:45:29 +00:00
nobu 8d501ec021 string.c: fast path of lstrip_offset
* string.c (lstrip_offset): add a fast path in the case of single
  byte optimizable strings, as well as rstrip_offset.
  [ruby-core:77392] [Feature #12788]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 05:10:56 +00:00
nobu 3973cc5820 minitest-5.9.1
* gems/bundled_gems: update to minitest-5.9.1.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 03:00:14 +00:00
rhe d1dbeebebf rbinstall.rb: don't install gemspec for skipped libraries
* tool/rbinstall.rb (gem): Don't install gemspec if no files will be
  installed for the gem. This happens when the extension library is not
  compiled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 02:50:31 +00:00
rhe 537fea9921 string.c: fix integer overflow in enc_strlen() and rb_enc_strlen_cr()
* string.c (enc_strlen, rb_enc_strlen_cr): Avoid signed integer
  overflow. The result type of a pointer subtraction may have the same
  size as long. This fixes String#size returning an negative value on
  i686-linux environment:

    str = "\x00" * ((1<<31)-2))
    str.slice!(-3, 3)
    str.force_encoding("UTF-32BE")
    str << 1234
    p str.size

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 02:09:50 +00:00
svn b1de2a1624 * 2016-09-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 22:29:17 +00:00
nobu 5ebce690df test_dln.rb: fix constants
* test/-ext-/win32/test_dln.rb (test_check_imported): use toplevel
  constants explicitly to get rid of constants under the scope.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 22:29:16 +00:00
nobu 7f6a2e4a60 vm_args.c: split make_unused_kw_hash
* vm_args.c (make_unknown_kw_hash, make_rest_kw_hash): split
  make_unused_kw_hash for key_only parameter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 14:48:22 +00:00
nobu 76a3f0ca2e remove unnecessary :stag accessor
* lib/erb.rb (ERB::Compiler::TrimScanner#stag): The :stag accessor
  has already been available because it is defined in parent
  Scanner class.  [Fix GH-1445]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 13:48:08 +00:00
nobu 598fd0cd94 proc.c: trivial optimization
* proc.c (rb_proc_arity): reduce repeated GetProcPtr.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 13:33:08 +00:00
svn 55ce57d8cc * 2016-09-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 10:23:34 +00:00
ktsj dd3ccb8b50 * node.c (dump_array): remove duplicate header of NODE_ARRAY/
NODE_VALUES.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-25 10:23:33 +00:00
nobu 021d3c7a9a appveyor.yml: build zlib together
* appveyor.yml (install): extract zlib source under ext/zlib and
  build within the build process.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 13:26:24 +00:00
nobu 97a016ac8a install extra libraries
* ext/extmk.rb (extract_makefile, extmake, configuration): store
  extra libraries to be installed.
* tool/rbinstall.rb (ext-arch): install extra libraries.
* ext/zlib/extconf.rb: install zlib if built.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 13:26:21 +00:00
nobu 3778f2f3d5 use OpenSSL-Win64
* appveyor.yml (install): use pre-installed OpenSSL-Win64.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 12:51:14 +00:00
nobu e969e3ba7b use TESTOPTS instead of OPTS for tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 12:51:14 +00:00
nobu e051de834d Download by AppVeyor
* appveyor.yml (install): use AppVeyor command-line utility to
  download files, instead of Start-FileDownload cmdlet which no
  longer works more than once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 11:52:56 +00:00
kazu 232d4828fc * spec/README: update URL. [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 05:26:42 +00:00
nobu 0cc169d1de fid typos [ci skip]
* fix typos, "a" before "Integer" to "an".  [Fix GH-1438]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 02:28:25 +00:00
nobu 967c013391 test_ruby_mode.rb: fix for Emacs 25.1
* test/misc/test_ruby_mode.rb (assert_indent): since write-region
  in Emacs 25.1 no longer displays the "Wrote file" message, shows
  the explicit message to check if successfully finished.
  [ruby-core:77355] [Bug #12785]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 01:19:43 +00:00
svn 1181ecbbd1 * 2016-09-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 01:18:35 +00:00
nobu 569d006295 test_ruby_mode.rb: save-buffer 0
* test/misc/test_ruby_mode.rb (EXPR_SAVE): use a numeric prefix
  argument of 0, not to make the previous version into a backup
  file, instead of backup-inhibited.
* test/misc/test_ruby_mode.rb (run_emacs): always save the buffer
  if modified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-24 01:18:34 +00:00
shugo 5a121a4f0b * vm_method.c (make_method_entry_refined): fix wrong use of ||.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 14:59:26 +00:00
nobu b212dd6674 zlib: no checks [ci skip]
* ext/zlib/extconf.rb: no feature checks when building zlib from
  the source, assume it is recent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 14:18:41 +00:00
nobu f5f8f3ce37 zlib: fix directory [ci skip]
* ext/zlib/extconf.rb: fix directory to install zlib library.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 14:18:39 +00:00
knu 9d5bc13fdb Add support for the `Lk` macro to tool/mdoc2man.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 12:40:16 +00:00
nobu 4d3e3c2550 forwardable.rb: remove debug print
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 12:16:00 +00:00
shugo 807114dd4d Remove a garbage file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 12:08:00 +00:00
svn 47ebf735c3 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 11:46:34 +00:00
svn 415d7a0311 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 11:46:34 +00:00
shugo a463ab1f05 * eval.c (rb_mod_refine): refine modules as well.
[ruby-core:76199] [Feature #12534]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 11:46:33 +00:00
knu 0b5a4e68c3 Update the paragraphs in "Rich Libraries" which included a dead link
* man/ruby.1: Update the paragraphs in "Rich Libraries" which
  included a dead link.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 11:21:55 +00:00
knu 7c30df7134 Use the `Lk` macro for hyperlinks
* man/ruby.1, man/erb.1, man/irb.1, man/ri.1: Use the `Lk` macro
  for hyperlinks, which has been available since mdocml 1.5.1
  (released more than seven years ago).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 11:21:52 +00:00
nobu ef13e60fe0 forwardable.rb: private methods
* lib/forwardable.rb (_delegator_method): allow private methods to
  be delegated, with warnings.  [ruby-core:77341] [Bug #12782]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 06:47:06 +00:00
nobu 1e1a114c25 test_fileutils.rb: use Dir.mktmpdir
* test/fileutils/test_fileutils.rb: use Dir.mktmpdir instead of
  fixed name for temporary directory.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 05:27:38 +00:00
nobu 7382eb7e38 compile.c: tailcall in conditinal block
* compile.c (iseq_peephole_optimize): enable tail call
  optimization inside a conditional block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 03:15:31 +00:00
svn 9ec75a259d * 2016-09-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-23 01:32:56 +00:00