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

45945 Коммитов

Автор SHA1 Сообщение Дата
nobu c8d3020463 test_rational.rb: shorten
* test/ruby/test_rational.rb (test_parse): reduce repeated
  arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16 00:43:07 +00:00
nobu c8a3b31bb1 vm_insnhelper.c: adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 12:41:56 +00:00
svn 0ddb77a44e * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 08:25:59 +00:00
ko1 10b800133e add several counters to analyze ivar inline caches.
* debug_counter.h: add (and renamed) several counters:
  ivar_get_ic_hit
  ivar_get_ic_miss
  ivar_get_ic_miss_serial
  ivar_get_ic_miss_unset
  ivar_get_ic_miss_noobject
  ivar_set_ic_hit
  ivar_set_ic_miss
  ivar_set_ic_miss_serial
  ivar_set_ic_miss_unset
  ivar_set_ic_miss_oorange
  ivar_set_ic_miss_noobject
  ivar_get_base
  ivar_set_base

  See related source code to know what counters mean.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 08:25:58 +00:00
nobu 0b1f6aed94 object.c: make String#to_f consistent with literal
* object.c (rb_cstr_to_dbl): stop at successive underscores, as
  well as Float literals.  [ruby-core:80098] [Bug #13105]

  * `_` should be within digits
  * only one `_` allowed between digits

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 08:15:32 +00:00
nobu 8c661ba264 string.c: shortcut argument check
* string.c (str_casecmp, str_casecmp_p): split to skip argument
  check when it is a String certainly.

* string.c (sym_casecmp, sym_casecmp_p): shortcut argument checks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 07:57:11 +00:00
kazu 8bc0729857 io.c: [DOC] add missing `$`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15 00:59:32 +00:00
marcandre 666df14594 * lib/matrix.rb: Add Vector.zero and Vector#zero?
Patch by Chia-sheng Chen [#13208]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 20:09:30 +00:00
svn 31e74d51fb * 2017-03-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 15:14:22 +00:00
mame a4d6fb5584 Stop a global server of Rinda test
This server seemed to cause "leaked file descriptor" warnings.
Moved it into the setup/teardown framework.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 15:14:21 +00:00
kazu 871d497c01 vm_insnhelper.c: undef BUILTIN_CLASS_P too
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 14:46:10 +00:00
glass 279d31f11d Fix bug of Tempfile#size if nothing is written [Bug #13198]
* lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing
  is written. Tempfile#size should return 0 in this case.
  The patch is from nobu <nobu@ruby-lang.org>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 12:53:32 +00:00
mame 3c96f9c76a Fix a consistency bug of ISEQ_COVERAGE [Bug #13305]
There is an invariant that ISEQ_COVERAGE(iseq) must be Qnil if and only
if option->coverage_enabled is false.  This invariant was broken by
NODE_PRELUDE which updates option->coverage_enabled but not
ISEQ_COVERAGE(iseq).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 11:39:58 +00:00
ko1 3651c0aa00 Fiber also has same issue. [Bug #13313]
* thread.c (rb_vm_proc_local_ep): added.

* cont.c (rb_fiber_start): use rb_vm_proc_local_ep().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 06:52:44 +00:00
nobu 1943242a46 thread.c: Thread.start with Symbol
* thread.c (thread_do_start): fix segfault at start with Symbol.
  proc created by Symbol#to_proc does not have environment unless
  using refinements.  [ruby-core:80147] [Bug #13313]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 05:54:35 +00:00
nobu c3f92cf213 thread.c: thread_do_start
* thread.c (thread_do_start): extract from a macro in
  thread_start_func_2 for debugger.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 05:54:33 +00:00
nobu 04eb385192 envutil.rb: basename for diagnostic_reports
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): diagnostic
  report file uses base name only.  [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 04:16:02 +00:00
nobu a7d6470f35 vm_core.h: assertions for Proc
* vm_core.h (vm_proc_block): assert before accessing.

* vm_core.h (vm_proc_iseq): remove duplicate assertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 04:03:48 +00:00
nobu 9fa56026e5 string.c: use rb_check_string_type
* string.c (rb_str_cmp_m): use rb_check_string_type for check and
  conversion, instead of calling the conversion method directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14 03:42:43 +00:00
svn 0088024233 * 2017-03-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 20:20:40 +00:00
stomar e6dec8f92e docs for Symbol#casecmp and Symbol#casecmp?
* string.c: [DOC] improve docs of Symbol#casecmp and Symbol#casecmp?
  according to the similar String methods; fix RDoc markup and typos;
  fix call-seq's for Symbol#{upcase,downcase,capitalize,swapcase}.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 20:20:40 +00:00
nobu a41d569e66 sprintf.c: fix out-of-bound access
* sprintf.c (rb_str_format): get rid of out-of-bound access when
  single % at the end.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 14:59:08 +00:00
nobu bd17e25588 string.c (rb_str_set_len): pathological check
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 11:47:45 +00:00
nobu b75f68ab8d file.c: join with /
* file.c (rb_file_join): join using "/" always, not a constant.
  and fix the document.  [ruby-core:79579] [Bug #13223]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 09:29:19 +00:00
nobu 16e804117c string.c: $; is a GC-root
* string.c (Init_String): $; must be a GC-root, not to be
  collected.  [ruby-core:79582]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 09:12:05 +00:00
naruse 1933215038 Raise error if spec is nil
With parallel test-all, the spec is sometimes nil.
To debug it raise more detailed error.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 09:05:35 +00:00
nobu 8179835101 parse.y: relax `&' warning
* parse.y (parser_yylex): disable "`&' interpreted as argument
  prefix" warning when just followed by a symbol literal.
  [ruby-core:79926] [Misc #13283]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 08:38:12 +00:00
mrkn 65285fbdb8 bigdecimal: version 1.3.2
Import bigdecimal version 1.3.2.  The full commit log is here:

  https://github.com/ruby/bigdecimal/compare/v1.3.1...v1.3.2

This fixes [ruby-core:79603] [Bug #13232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 06:03:18 +00:00
nobu ea7af54e73 thread.c: rb_thread_fd_close [ci skip]
* thread.c (rb_thread_fd_close): remove deprecated. a couple of
  external libraries used it.  [ruby-core:80078] [Bug #13304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 05:30:44 +00:00
nobu 5b72a06cbe thread.c: rb_thread_fd_close no longer returns
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 03:30:11 +00:00
nobu c617568c53 thread.c: rb_thread_fd_close [ci skip]
* thread.c (rb_thread_fd_close): re-define only for abi-check,
  abort if called.  [ruby-core:80078] [Bug #13304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 02:14:15 +00:00
nobu c279ac3615 compile.c: compile flip-flop
* compile.c (iseq_compile_each0): compile flip-flop directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 00:11:25 +00:00
nobu dae32a40d9 compile.c: omit newrange
* compile.c (iseq_compile_each): omit creating literal-only range
  to be popped immediately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-13 00:11:24 +00:00
naruse 70474e9bfc io.c: [DOC] IO#puts uses IO#write
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 18:40:07 +00:00
svn 9e98fa9031 * 2017-03-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 18:31:39 +00:00
naruse 0256fa8890 Didn't work if backport field is empty
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 18:31:38 +00:00
nobu c9a1f7a42b compile.c: compile_const_prefix
* compile.c (compile_const_prefix): rename, and check the result
  of parts of the prefix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 13:51:12 +00:00
nobu c0764a3cd8 compile.c: omit newhash
* compile.c (iseq_compile_each): omit creating literal-only hash
  to be popped immediately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 05:52:42 +00:00
nobu ae46708c10 compile.c: NODE_VALUES must not be popped
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-12 05:48:58 +00:00
nobu cd7b59e4f2 compile.c: iseq_compile_each0
* compile.c (iseq_compile_each0): split from null node case to
  constify line and type.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 22:44:26 +00:00
nobu f19b041837 compile.c: compile_when
* compile.c (compile_when): extract from iseq_compile_each.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 22:37:50 +00:00
nobu 16e5c20f9a compile.c: compile_case
* compile.c (compile_case): extract from iseq_compile_each.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 22:25:32 +00:00
stomar 44fbaaae46 lib/ostruct.rb: [DOC] revise docs for OpenStruct
* update paragraph on implementation:
  define_singleton_method is used, not define_method
* add call-seq with return values for each_pair
* adopt description of dig from Array and Hash
* fix description of the hash method
* :nodoc: initialize_copy, respond_to_missing?
* other small improvements, e.g. use the term `attribute' in the docs
  (instead of `member'), which is clearer for users of the class
* improve code examples: e.g. use more consistent style (always use
  double quotes, drop `p' and `puts', ...), update inspect output,
  use example data that is not prone to change (like population)
* add more code examples
* fix some small errors and grammar

[ruby-core:79265] [Bug #13159]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 21:32:46 +00:00
stomar 605b472d2d docs for String#casecmp and String#casecmp?
* string.c: [DOC] specify when String#casecmp and String#casecmp?
  return nil; modify examples to better show difference to <=>;
  fix RDoc markup and typos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 20:01:55 +00:00
naruse 1c96bfab98 Generate log from svn log
When there's multiple revisions, all svn logs should be used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 19:03:11 +00:00
svn f0e0823042 * 2017-03-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 16:08:55 +00:00
naruse 2c8701fc83 suppress warning: shadowing outer local variable - dir & opt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 16:08:54 +00:00
nobu 5242bca205 defs/gmake.mk: update again after comit [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 13:24:08 +00:00
nobu 0d45ea8d8a compile.c: constify flags
* compile.c (compile_cpath): return `noscoped` bit flag, instead
  of boolean flag.

* compile.c (iseq_compile_each): constify flags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 12:26:00 +00:00
nobu 0348262384 test/ruby/test_require.rb: use squiggly heredocs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-11 11:15:05 +00:00