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

40953 Коммитов

Автор SHA1 Сообщение Дата
ko1 9e1b06e17d * vm_core.h, vm_insnhelper.h: move definition of VMDEBUG
from vm_insnhelper.h to vm_core.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 16:57:58 +00:00
knu 1b5dce5a4e * NEWS: [DOC] In the new safe call syntax, arguments are evaluated
only if a call is made.

* doc/syntax/calling_methods.rdoc: Fix a typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 16:53:41 +00:00
svn 4daa1cf730 * 2015-10-24
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 15:41:21 +00:00
shugo 8c8e17d499 * lib/forwardable (def_instance_delegator, def_single_delegator):
rescue ::Exception instead of Exception in case Exception is
  defined under the target class.
  [ruby-core:71175] [Ruby trunk - Bug #11615]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 15:41:04 +00:00
nobu f8a83d8563 error.c: use fake string
* error.c (name_err_mesg_to_str): use fake string as rb_str_format
  does not require T_STRING to be cannonical VALUE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 14:27:37 +00:00
nobu 5bf61f4540 error.c: separate class names
* error.c (name_err_mesg_to_str): separate class names from the
  receiver description.
* vm_eval.c (make_no_method_exception, raise_method_missing): add
  format specifiers for class names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 12:10:40 +00:00
hsbt e3b0788378 * .gitignore: ignored environmantal wrapper files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 09:10:39 +00:00
hsbt 00d8b1a85d * lib/irb.rb: Ignored assignment of STDOUT.sync = true
when irb.rb loaded. It's affected to IDE such as Jetbrain.
  [fix GH-864] Patch by @os97673

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 08:55:35 +00:00
hsbt 2cd1f852e1 * lib/ipaddr.rb, test/test_ipaddr.rb: Reject invalid address contained
EOL string. Patch by @kachick [fix GH-942][Bug #11513]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 07:35:14 +00:00
nobu 2697fb4990 ChangeLog: adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 07:07:36 +00:00
hsbt 5fdee2f829 * file.c: fix indent style. [fix GH-977]
* test/ruby/test_string.rb: indent. [fix GH-975]
[ci skip] These patches are contributed from @yui-knk

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 07:03:34 +00:00
hsbt 26cd2da784 * string.c: Added method signature to include hash. It's inconsistency
with `gsub` method signature.
  [ci skip][fix GH-1023] Patch by @danielevans

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:46:15 +00:00
shugo e0ea5e903b * lib/net/imap.rb: remove an empty comment line and -*-.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:29:08 +00:00
shugo 3eabc555cb * lib/net/ftp.rb (gettextfile, getbinaryfile): use the safe
navigation operator.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 06:23:16 +00:00
nobu 1d3c07633c test_call.rb: add tests
* test_call.rb (test_safe_call): Add test cases for safe
  navigation operator assignment.  [Fix GH-1064]
  Validate:
  * can assign an attribute which is `nil`
  * can "or assign" an attribute which is `nil`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 04:51:35 +00:00
nobu ae8f8fddb0 compile.c: optimize method chain
* compile.c (iseq_peephole_optimize): optimize lengthy safe
  navigation method chain.  [Feature #11537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 02:58:22 +00:00
svn 4f9ded5cdd * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 02:09:16 +00:00
shugo d07ce082a6 * lib/matrix/eigenvalue_decomposition.rb (tridiagonalize): fix
indentation to avoid a warning when the command line option -w of
  ruby is specified.

* lib/matrix/eigenvalue_decomposition.rb (hessenberg_to_real_schur):
  change the name of a block parameter to avoid a warning when the
  command line option -w of ruby is specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 02:09:03 +00:00
nobu 0b7d473734 safe navigation attrset
* compile.c (iseq_compile_each): support safe navigation of simple
  attribute assignment.  [Feature #11537]
* parse.y (mlhs_node, lhs, attrset_gen): ditto.  keep mid
  non-attrset as the sign of safe navigation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 01:49:38 +00:00
nobu 7e730322ee compile.c: just insert
* compile.c (compile_massign_lhs): just insert topn insn instead
  of popping and adding.  [Feature #11537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-23 01:47:08 +00:00
nobu 418fa65d1a NEWS: add a space
* NEWS: fix wording, "Active Support" has a space in between the
  words, not ActiveSupport.
  https://github.com/ruby/ruby/commit/a356fe1#commitcomment-13936198

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 23:42:51 +00:00
normal d4fd2fb0a3 test/io/wait/test_io_wait.rb (test_wait_eof): test return value
I wrote some code which relies on this nowadays, but Ruby <=2.2
and earlier behaved differently...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 22:25:19 +00:00
normal d737d5765d NEWS: fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 20:36:08 +00:00
naruse 7b90b13755 Add rlimit_nproc to avoid to create many process [Bug #11613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 16:54:55 +00:00
naruse b5f2b5e1a2 ALPN also uses the same logic [Bug #11369]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 16:54:05 +00:00
naruse d7d779b594 * ext/openssl/ossl_ssl.c (ssl_npn_select_cb): explicitly raise error
in ext/openssl instead of OpenSSL itself because LibreSSL
  silently truncate the selected protocol name by casting the length
  from int to unsigned char. [Bug #11369]
  Patch by Jeremy Evans <merch-redmine@jeremyevans.net>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 16:54:01 +00:00
shugo e4d925bf3a * lib/un.rb (help): change the name of a block parameter to avoid
a warning when the command line option -w of ruby is specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:51:07 +00:00
nobu bcc07ef4d1 fix backslash [ci skip]
* string.c (rb_str_tr): [DOC] Escape backslash in String#tr
  documentation.  [Fix GH-1063]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:22:22 +00:00
nobu 77a952d1fb adjust spaces [ci skip]
* array.c (rb_ary_collect): [DOC] Fix space of code example of
  Array#map.  [Fix GH-1062]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:19:06 +00:00
svn 439c3e230f * 2015-10-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:00:39 +00:00
naruse b471c9d35a limit the number of FDs in a process for stress test
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:00:13 +00:00
nobu 29a1905c7d common.mk: showflags only once
* common.mk (showflags): do not show flags from recursive make.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 14:56:37 +00:00
nobu be8a9db524 colorize
* tool/generic_erb.rb: use VT100 sequence if tput does not work.

* tool/ifchange: ditto and add --color option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 14:02:38 +00:00
nobu 35957b7690 ifchange: ignore error
* tool/ifchange: do not exit by -e even if tput failed.
  [ruby-core:71143] [Bug #11611]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 13:53:01 +00:00
knu f4c487173c Kernel#loop returns the result value of a finished iterator
* vm_eval.c (rb_f_loop): When a loop is stopped by a StopIteration
  exception, return what the enumerator has returned instead of
  nil. [ruby-core:71133] [Feature #11498]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 09:58:01 +00:00
svn 53d6e605b0 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 09:32:44 +00:00
shugo 68fc350abe * lib/net/imap (idle): add a new argument timeout for keep-alive.
[ruby-core:63693] [Bug #10031]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 09:32:19 +00:00
nobu 30b839a013 generic_erb.rb: ignore error
* tool/generic_erb.rb: ignore error that tput is not found.
  [ruby-core:71143] [Bug #11611]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 08:56:30 +00:00
nobu a356fe1c35 Safe navigation operator
* compile.c (iseq_peephole_optimize): peephole optimization for
  branchnil jumps.
* compile.c (iseq_compile_each): generate save navigation operator
  code.
* insns.def (branchnil): new opcode to pop the tos and branch if
  it is nil.
* parse.y (NEW_QCALL, call_op, parser_yylex): parse token '.?'.
  [Feature #11537]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 06:30:12 +00:00
nobu 5a599dde0c generic_erb.rb: highlight
* tool/generic_erb.rb: highlight result messages too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 06:25:33 +00:00
nobu ff3288fe5a dir.c: glob brace expansion [Fix GH-1061]
* dir.c (ruby_brace_expand): glob brace expansion edge case fix.
  When there are closing braces '}' before a open brace '{' it
  must be ignored and considered as literal.
  [ruby-core:71138] [Bug #11609]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 04:16:21 +00:00
nobu 66e41cbe4f io.c: check ARGV element type
* io.c (argf_next_argv): check ARGV element type, and try
  conversion if necessary.  [ruby-core:71140] [Bug #11610]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 04:13:52 +00:00
svn 23419d859a * 2015-10-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 02:21:58 +00:00
shugo 19110fe19a * test/net/ftp/test_ftp.rb: add tests for getbinaryfile and
gettextfile.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 02:21:06 +00:00
nobu a76fdea9fc parse.y: magic comment w/o indicators
* parse.y (parser_magic_comment): allow a sole magic comment without
  indicators, neither other non-space comments.  [Feature #8976]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-21 09:34:09 +00:00
nobu 5fe6919344 Makefile.in: tty at reconfig
* aclocal.m4 (_COLORIZE_RESULT_PREPARE): force tty for reconfig.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-21 07:16:33 +00:00
svn 21494036da * 2015-10-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-21 00:36:27 +00:00
nobu de2d45100d extconf.rb: strict_warnflags
* ext/date/extconf.rb: add strict warning flags same as ruby
  itself for C99 option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-21 00:35:50 +00:00
nobu 2bb1e93d92 test -t
* aclocal.m4, tool/ifchange: make the fd explict.
  [ruby-dev:49311] [Bug #11608]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-20 14:40:17 +00:00
nobu 96003bc9ac missing.h: fix condition
* include/ruby/missing.h (bytesequence4_or_float): define by
  configured result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-20 07:15:16 +00:00