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

45411 Коммитов

Автор SHA1 Сообщение Дата
nobu bc388526ba fix prolog in gem wrapper scripts
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 14:15:00 +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 0f78a6a1b9 rbinstall.rb: LIBRUBY_RELATIVE
* tool/rbinstall.rb: see LIBRUBY_RELATIVE in CONFIG instead of
  reading config.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 05:58:44 +00:00
nobu 5dc87d5ba3 insns.def: float comparison
* insns.def (opt_lt, opt_le, opt_gt, opt_ge): optimize flonum and
  on-heap float comparison.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 05:49:43 +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
svn a51cf13429 * 2017-01-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 01:46:45 +00:00
nobu d569c0c546 vm_dump.c: postscript_dump
* vm_dump.c (postscript_dump): mention crash report log twice
  because important.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-13 01:46: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
nobu 257fd90166 compile.c: invalid yield in main
* compile.c (iseq_compile_each): yield cannot be in the main
  context as well as a top context.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-12 05:43:00 +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
svn 1807c052be * 2017-01-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 22:38:51 +00:00
normal 208018fb9d random.c (fill_random_bytes_syscall): use "__NR_" prefix on Linux
glibc still does not define the SYS_getrandom alias for
__NR_getrandom in the Linux kernel.  However, installing
up-to-date Linux kernel headers (linux-libc-dev >= 3.17 package
on Debian) will get the __NR_getrandom syscall number defined
properly without relying on glibc.

This allows users with a modern kernel+headers to use the getrandom
syscall without waiting on glibc support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 22:38:50 +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 1df80905a3 variable.c: fix the condition to cache
* variable.c (rb_const_set): fix the condition to cache the class
  path and cache permanent or temporary path corresponding to the
  outer klass.  [ruby-core:79039] [Bug #13120]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-11 04:12:56 +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
svn e4a2dd5f52 * 2017-01-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 15:28:12 +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
nobu a3fb17f3a0 rational.c: short circuit optimization
* rational.c (nurat_reduce): short circuit when arguments are ONE,
  nothing is needed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 13:41:18 +00:00
nobu 14b3dc1ec4 rational.c: f_idiv
* rational.c (f_idiv): call rb_int_idiv directly if possible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 13:37:34 +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 3c199bb700 numeric.c: short circuit optimization
* numeric.c (fix_mul): short circuit when multiplication of Bignum
  and 0 or 1 not to make a Bignum unnecessarily.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 12:18:21 +00:00
svn 93ff30bfe5 * 2017-01-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 10:57:26 +00:00
nobu c54c60da26 thread.c: fix todo
* thread.c (rb_threadptr_pending_interrupt_check_mask): traverse
  the super class chain instead of making ancestors array.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57294 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-10 10:57:26 +00:00
nobu ff3496b011 vm_insnhelper.c: block argument at tailcall
* vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts
  after set up the new frame, not the passed block to be clobbered
  by invoked finalizers and so on.  [ruby-core:78981] [Bug #13107]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-09 02:55:39 +00:00
svn d4983225c0 * 2017-01-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-09 02:45:29 +00:00
nobu 474a730182 slex.rb: japanese comment [ci skip]
* lib/irb/slex.rb (postproc): translated a japanese comment in
  ISO-2022-JP.  [ruby-core:79017] [Misc #13117]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-09 02:45:28 +00:00
kazu 6a680a5cb3 lib/getoptlong.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 04:17:08 +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 4794ce55a5 driver.rb: measure_target option [ci skip]
* benchmark/driver.rb (BenchmarkDriver.load): restore
  measure_target option from the loaded results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 03:51:35 +00:00
nobu 437a8cc4ca driver.rb: out output file when loading [ci skip]
* benchmark/driver.rb: default output file is not used when
  loading rawdata.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 03:50:32 +00:00
nobu caca9a473f driver.rb: extract loop times [ci skip]
* benchmark/driver.rb (BenchmarkDriver.load): extract loop times
  from the loaded results to adjust the results.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 03:46:17 +00:00
nobu 1bf10e33fd driver.rb: adjust name width [ci skip]
* benchmark/driver.rb (show_results): count adjusted result marks
  as the name width.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 03:45:34 +00:00
nobu faf472a2bb variable.c: resolve permanent name only
* variable.c (rb_const_set): resolve and cache class name
  immediately only if the outer class/module has the name,
  otherwise just set the ID.  [ruby-core:79007] [Bug #13113]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 01:59:54 +00:00
nobu 8e98002701 benchmarks for [Bug #13113] [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-08 01:46:10 +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
svn 945934cc9a * 2017-01-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 22:52:03 +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
nobu d59dfcdb04 adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 11:54:10 +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
nobu 4dbbcc48de bignum.c: unnecessary check
* bignum.c (rb_cstr_parse_inum): remove unnecessary check.
  successive sign is rejected by conv_digit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 08:31:03 +00:00
svn 60172f015f * 2017-01-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-07 02:14:08 +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 7802f01d4f prelude.rb: Binding#irb [ci skip]
* prelude.rb (Binding#irb): [EXPERIMENTAL] automatically require
  irb and run.  [ruby-core:78960] [Bug #13099]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-06 03:11:45 +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