* misc/lldb_cruby.py (lldb_rp): evaluate without frames when no
process is running, and show error messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: [DOC] add an example for Object#yield_self that
better illustrates its purpose; other small improvements.
Reported by Vitaly Tatarintsev (ck3g). Patch by Marcus Stollsteimer.
[Fix GH-1637]
* object.c: [DOC] improve docs for Object#{itself,tap}.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In enc/utf_8.c, change maximum byte length of UTF-8 to 4 bytes (from 6)
to conform to definition of UTF-8. This closes issue #13590.
(This is a retry of r58954, after issue #13590 has been addressed.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/spec/rubyspec/library/erb/run_spec.rb:63: warning: method redefined; discarding old main
ruby/spec/rubyspec/library/erb/result_spec.rb:53: warning: previous definition of main was here
ruby/spec/rubyspec/library/erb/run_spec.rb:76: warning: method redefined; discarding old main1
ruby/spec/rubyspec/library/erb/result_spec.rb:67: warning: previous definition of main1 was here
ruby/spec/rubyspec/library/erb/run_spec.rb:81: warning: method redefined; discarding old main2
ruby/spec/rubyspec/library/erb/result_spec.rb:72: warning: previous definition of main2 was here
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Revert change to maximum of 4 bytes for UTF-8 characters at r58954 temporarily.
This failed spec at https://travis-ci.org/ruby/ruby/builds/237086017, but it
is totally unclear why.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
In enc/utf_8.c, change maximum byte length of UTF-8 to 4 bytes (from 6)
to conform to definition of UTF-8. This closes issue #13590.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/mspec/lib/mspec/helpers/fs.rb (Object#mkdir_p): rescue
File.stat when the target does not exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/default.mspec: removed -I options for useless or non-
existent paths from flags. there is no library scripts and .ext
directory in the source directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* misc/lldb_cruby.py (lldb_init): get constants from
ruby_dummy_gdb_enums in the target.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c (load_file): move opened file to an argument, to reduce
open/close calls in the near future.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c (ruby_cmdline_options_t): reordered members and turned
simple flags into bit fields to reduce the size (136->104 on
LP64).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
I miscalculated for r58934, since we sleep 100ms, and
the worst possible case is 100 Hz in the kernel meaning
we only have 10ms resolution. So, we need to increase
our CPU percentage to >= 10% for this.
This should be more than enough for our CI machines which
have 300 Hz kernels [ruby-core:81429]:
http://ci.rvm.jp/results/trunk-test@sasada-8core/1495942555
* test/ruby/test_io.rb (test_copy_stream_no_busy_wait):
override default percentage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
if getrusage(2) is available, to improve precision of Process.times and
its user like lib/benchmark.rb.
On macOS, since getrusage(2) has better precision than times(3),
they are much improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.56, stime=0.35, cutime=0.04, cstime=0.03>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.340000 0.310000 0.650000 ( 0.674025)
* After
Process.times
=> #<struct Process::Tms utime=0.561899, stime=0.35076, cutime=0.046483, cstime=0.038929>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.343223 0.310037 0.653260 ( 0.674025)
On Linux, since struct rusage from getrusage(2) is used instead of struct tms
from times(2), they are slightly improved like:
* Before
Process.times
=> #<struct Process::Tms utime=0.43, stime=0.11, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.120000 0.040000 0.170000 ( 0.171621)
* After
Process.times
=> #<struct Process::Tms utime=0.432, stime=0.116, cutime=0.0, cstime=0.0>
puts Benchmark.measure { "a" * 1_000_000_000 }
0.124000 0.048000 0.172000 ( 0.171621)
[ruby-dev:49471] [Feature #11952]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
When sleeping for the tick rate of 100ms (defined in
thread_pthread.c) as we do in test/ruby/test_io.rb
(test_copy_stream_no_busy_wait), it may not be possible to
measure with <= 10ms resolution on 100HZ systems (CONFIG_HZ in
the Linux kernel). So increase the threshold to 15ms (10ms +
5ms slack for slow systems).
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low):
increase pct default value [ruby-core:81427]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Instead, match the poll() implementation used on Linux for now;
as the Linux poll(2) manpage describes using negative FD to
easily ignore an FD in a larger FD set while (sleeping the given
timeout). I'm not entirely sure if matching poll() behavior
is a good idea for a single FD, but it's better than segfaulting
or NoMemoryError.
* thread.c (init_set_fd): ignore negative FD
* test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb
(test_wait_for_invalid_fd): check values which may trigger
segfaults or OOM
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e