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

50985 Коммитов

Автор SHA1 Сообщение Дата
yui-knk acc48fce30 ast.c: Change tabs to spaces
* ast.c: I created a new C source code file with tabs and spaces mixed
  format by mistake. Currently we move to spaces only.
  Surely we agreed not to batch update. But ast.c is a new
  source code. So please forgive me to change the format before
  many changes are committed this file.
  I'm sorry about my mistake.

  ref [Bug #14246]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 06:14:21 +00:00
normal 1c8b370840 test/io/console/test_io_console.rb: fix for systems where PTY is not defined
[ruby-core:87420] [Bug #14828]
Thanks-to: MSP-Greg (Greg L)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-06 01:12:23 +00:00
normal 6df880c862 test/lib/jit_support.rb: spelling: s/skiped/skipped/
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 22:32:41 +00:00
normal bcd984f02f test/io/console/test_io_console.rb: ignore TTOU on FreeBSD
I'm not entirely sure why, but SIGTTOU pauses the test
when running test-all in parallel.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 22:28:49 +00:00
normal 4e730838a0 encoding.c: remove rb_gc_mark_encodings
rb_gc_mark_encodings has been empty for a decade
(since r17875 / 28b216ac45).
Just remove it and its only caller in gc.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 22:01:43 +00:00
normal 750f1a3988 test/dtrace/helper.rb: support systemtap in dtrace tests
For the current cases, a few string substitions is enough to
make dtrace(1) scripts work with stap(1).  For more complex
scripts (maybe in the future), we may pass a hash with
implementation-specific scripts.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:50 +00:00
normal bd80fc5315 test/dtrace: enable Tracepoint for function calls
Since [Feature #14104], "trace" instructions are no
longer emitted by default, so we must enable them explicitly
for function tracing to work.

[ruby-core:85965]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:45 +00:00
normal ca9cf0e076 test/dtrace/test_method_cache.rb: avoid spewing too much
Don't output method cache clearing at startup since
it causes dtrace to drop output and break the test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:40 +00:00
normal c97952dd0f test/dtrace/test_array_create.rb: require line number
Nowadays we create empty arrays in the parse/compile
phase which gave us lineno==0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:36 +00:00
normal 2acd50ed42 test/dtrace/helper: fix check for miniruby
RbConfig::TOPDIR points to my installation prefix on my FreeBSD
and GNU/Linux systems, so there's no way miniruby exists, there.
In case we don't have miniruby, --disable=gems anyways to reduce
dtrace overhead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 21:19:31 +00:00
normal 894628ac02 io.c: fix compilation when IOV_MAX is not defined
GNU/Hurd has writev(2) but does not define IOV_MAX
[ruby-core:87417] [Bug #14827]

Reported-by: Paul Sonnenschein

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 20:46:56 +00:00
normal e1e61c5b60 gc.c: reduce parameters for gc_start and garbage_collect
Every time I look at gc.c, I get confused by argument ordering:

	gc_start(..., TRUE, TRUE, FALSE, ...)
	gc_start(..., FALSE, FALSE, FALSE, ... )

While we do not have kwargs in C, we can use flags to improve readability:

	gc_start(...,
		GPR_FLAG_FULL_MARK | GPR_FLAG_IMMEDIATE_MARK |
		GPR_FLAG_IMMEDIATE_SWEEP | ...)

[ruby-core:87311] [Misc #14798]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 20:16:21 +00:00
svn 82962f9119 * 2018-06-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 19:53:10 +00:00
normal 42fb583198 gc.c: reduce #ifdefs around GC_ENABLE_*
We may add gc_*_continue calls in a few more places, and adding
more #ifdefs around those is ugly.  For now, this makes the
heap_prepare function look better.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 19:53:09 +00:00
ngoto b7595f2c2e include/ruby/missing.h: defined(__cplusplus) before using __cplusplus
* include/ruby/missing.h (isinf, isnan): For non-C++ programs,
  defined(__cplusplus) may be needed before using __cplusplus.
  [Bug #14816]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 14:16:50 +00:00
shyouhei b5d6db65b4 `int isnan(double)` is a POSIXism
- `isnan` is something relatively new.  We need to provide one for
  those systems without it.  However:
- X/Open defines `int isnan(double)`. Note the `int`.
- C99 defines `isnan(x)` to be a macro.
- C++11 nukes them all, undefines all the "masking macro"s, and
  defines its own `bool isnan(double)`.  Note the `bool`.
- In C++, `int isnan(double)` and `bool isnan(double)` are
  incompatible.
- So the mess.

[Bug #14816][ruby-core:87364]
further reading: https://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 06:50:20 +00:00
yui-knk 43cc8ad924 test_ast.rb: Add test cases of heredoc columns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 00:48:12 +00:00
normal cc1c6552b7 gc.c: zero check for malloc_limit_max to initialization
Repeatedly checking for malloc_limit_max in gc_reset_malloc_info
is unnecessary, check and set it once during initialization
in ruby_gc_set_params to simplify the hotter path

* gc.c (gc_reset_malloc_info): remove zero check
  (ruby_gc_set_params): treat malloc_limit_max==0 as SIZE_MAX

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 00:37:05 +00:00
yui-knk 9e1bb6ed5a Move a test file
* test/-ext-/ast/test_ast.rb: This test file
  has not depended C extension since r63534,
  so move to 'test/ruby/'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-05 00:18:29 +00:00
svn fa0e55707c * 2018-06-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-04 23:26:04 +00:00
normal 256411b47f String#uminus dedupes unconditionally
[Feature #14478] [ruby-core:85669]

Thanks-to: Sam Saffron <sam.saffron@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-04 23:26:03 +00:00
svn b3cb6dbafc * 2018-06-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03 21:06:26 +00:00
normal c27a8e87a9 benchmark/driver.rb: add CPU time measurement targets
"Real" time is too unstable on my systems, hopefully counting
only CPU time can gain more reliable benchmark results.

[ruby-core:87362] [Feature #14815]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03 21:06:26 +00:00
svn ce7c531cbf * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03 05:10:43 +00:00
mame cd0fec3728 Add TracePoint#parameters
It can be used to get the parameters' information of method and block.
There was no way to get block parameters.
It was possible but ineffective to get method parameters via Method
object: `tp.defined_class.method(tp.method_id).parameters`
TracePoint#parameters allows us to get the information easily.
[Feature #14694]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-03 05:10:41 +00:00
svn 25d1891899 * 2018-06-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 23:05:46 +00:00
hsbt 8ce71b6160 Promote Prime library to default gems.
* Its upstream is https://github.com/ruby/prime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 23:05:45 +00:00
hsbt 1dd4321844 Promote Logger to default gems.
* Its upstream is https://github.com/ruby/logger.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 13:57:48 +00:00
hsbt 46ec01cb3c Fixed wrong variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 13:55:54 +00:00
nobu 8a4656c9be gmake.mk: update in the source directory properly
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 12:17:16 +00:00
svn 295b1c5e6d * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 08:36:01 +00:00
hsbt 14e196925d Added test for default gems validation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 08:36:00 +00:00
nobu 7495b2d2d6 enum.c: bignum counter
* enum.c (imemo_count_up, imemo_count_value): promote the counter
  value to a bignum on overflow.  [Bug #14805]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 07:50:18 +00:00
hsbt 4973f30474 Fixed wrong require path
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 07:04:28 +00:00
hsbt 0f5b67526a Promote REXML to default gems.
* upstream repostiory is https://github.com/ruby/rexml

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 06:02:51 +00:00
nobu 6bb70c11b3 enum.c: mitigate overflows
* enum.c (enum_count): convert counters to Integer as unsigned
  long, instead of long, to mitigate overflows.
  [ruby-core:87348] [Bug #14805]

* enum.c (ary_inject_op): ditto.

* enum.c (each_with_index_i): ditto, instead of int.

* enum.c (find_index_i, find_index_iter_i): ditto, instead of
  unsigned int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 02:39:34 +00:00
hsbt ccc52902c0 Promote RSS library to default gems.
Its upstream was moved to https://github.com/ruby/rss.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 01:14:24 +00:00
naruse 9b6175b282 memo->u3.cnt is long not int [Bug #14805]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-02 00:51:43 +00:00
normal 832b601e49 Initialize condattr_monotonic via pthread_condattr_init
Some operating systems will work without calling
pthread_condattr_init, but some won't (such as OpenBSD). Prior
to r63238, pthread_condattr_init was always called before
calling pthread_condattr_setclock.

From: Jeremy Evans <code@jeremyevans.net>
[ruby-core:87345] [Ruby trunk Bug#14807]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 21:56:11 +00:00
svn 24c6231e11 * 2018-06-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 21:23:21 +00:00
normal 3eb12cb688 gc.c: reduce size slightly by making MEMOP_TYPE_MALLOC zero
Most (if not all) architectures have instructions for comparing
against zero, allowing compilers to generate more compact code.

Other MEMOP_TYPE_* enum values are not compared in hot paths,
but MEMOP_TYPE_MALLOC is checked in objspace_malloc_increase

   text	   data	    bss	    dec	    hex	filename
  84088	    264	   3664	  88016	  157d0	gc-before.o
  83784	    264	   3664	  87712	  156a0	gc.o

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 21:23:20 +00:00
hsbt afbf10e8c6 Added missing dependency for ast.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 13:10:37 +00:00
knu 6251615c12 Skip colliding filenames in LIBRUBY_ALIASES
This allows user to specify any name in `--with-so-name` that might
cause a name clash with LIBRUBY_ALIASES on the platform.

Without this, for example, configuring with `--with-soname=ruby
--enable-shared` on macOS would end up running `ln -sf libruby.dylib
libruby.dylib` only to fail with the following error in installation:

```
make[2]: stat: libruby.dylib: Too many levels of symbolic links
```

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 07:13:38 +00:00
nobu ce2f4f8526 string.c: trivial optimizations
* string.c (rb_str_aset): prefer BUILTIN_TYPE over TYPE after
  SPECIAL_CONST_P check.

* string.c (rb_str_start_with): prefer RB_TYPE_P over switch by
  TYPE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 06:53:26 +00:00
svn ccdcc7300d * 2018-06-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 06:37:15 +00:00
nobu 87ccf7e50a string.c: doc for [Feature #13712]
* string.c (rb_str_start_with): [DOC] start_with? example with
  regexp.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-01 06:37:14 +00:00
nobu fef8339f58 vm_args.c: refined warning splat to var
* vm_args.c (setup_parameters_complex): refine the warning message
  for a splat hash which was passed to a single variable instead
  of keyword arguments.  this behavior will be changed when the
  "real" keyword argument is introduced in the future.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 09:30:49 +00:00
nobu a6273888a3 fix the condition
* test/ruby/test_rubyoptions.rb: Process.wait with WNOHANG returns
  nil while the target process is alive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 07:10:39 +00:00
nobu 83b14c26aa test_rubyoptions.rb: relax timeout
* test/ruby/test_rubyoptions.rb: wait for setting process title
  until the child process dies, in the case of extra heavy loads.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 06:57:47 +00:00
yui-knk 9e82c4f1c1 NEWS: Add RubyVM::AST
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-31 06:25:58 +00:00