Age | Commit message (Collapse) | Author |
|
Remove tests that assume objects get force recycled.
Notes:
Merged: https://github.com/ruby/ruby/pull/5096
|
|
Mashalling a closed IO object raised "closed stream (IOError)" before instead of TypeError.
This changes IO#(in|ex)ternal_encoding to still return the encoding even if the underlying FD is closed.
Fixes bug #18077
Notes:
Merged: https://github.com/ruby/ruby/pull/4758
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/4592
|
|
because the name "MJIT" is an internal code name, it's inconsistent with
--jit while they are related to each other, and I want to discourage future
JIT implementation-specific (e.g. MJIT-specific) APIs by this rename.
[Feature #17490]
|
|
Also document that both :deprecated and :experimental are supported
:category option values.
The locations where warnings were marked as deprecation warnings
was previously reviewed by shyouhei.
Comment a couple locations where deprecation warnings should probably
be used but are not currently used because deprecation warning
enablement has not occurred at the time they are called
(RUBY_FREE_MIN, RUBY_HEAP_MIN_SLOTS, -K).
Add assert_deprecated_warn to test assertions. Use this to simplify
some tests, and fix failing tests after marking some warnings with
deprecated category.
Notes:
Merged: https://github.com/ruby/ruby/pull/3917
|
|
* Otherwise those tests, etc cannot run on alternative Ruby implementations.
|
|
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20201203T123002Z.log.html.gz
```
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1830:
warning: method redefined; discarding old test_each_byte
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:376:
warning: previous definition of test_each_byte was here
test/unit warning: method TestIO#test_each_byte is redefined
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1849:
warning: method redefined; discarding old test_each_char
/home/chkbuild/chkbuild/tmp/build/20201203T123002Z/ruby/test/ruby/test_io.rb:1799:
warning: previous definition of test_each_char was here
test/unit warning: method TestIO#test_each_char is redefined
```
|
|
This commit deletes
{IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which
have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4.
Note that String also has those methods. They are neither depreacted
nor deleted because they are not aliases of counterpart each_something.
|
|
test_io.rb"
* This partially reverts commit dead7478748a828c45e16134fca812bc7771344e.
* Windows will not allow a file to be unlinked if any file handles exist,
see https://github.com/ruby/ruby/pull/3597
|
|
|
|
And `-w` option turns it on.
Notes:
Merged: https://github.com/ruby/ruby/pull/3481
|
|
Start with https://github.com/ruby/ruby/commit/fa21985a7a2f8f52a8bd82bd12a724e9dca74934
to https://github.com/ruby/ruby/commit/d7492a0be885ea9f2b9f71e3e95582f9a859c439
|
|
automatically
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3460
|
|
As well as the other places using RCLASS_IV_INDEX_TBL.
`IO#reopen` seems the only case that the class of an object can be
changed.
|
|
So that `TEST_EXCLUDES` option in common.mk works.
|
|
Raise `SignalException` for SIGPIPE to abort when EPIPE occurs.
Notes:
Merged: https://github.com/ruby/ruby/pull/3013
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Previously, the external encoding was only set correctly for
File::BINARY if keyword arguments were provided. This copies
the logic for the keyword arguments case to the no keyword
arguments case. Possibly it should be refactored into a
separate function.
Fixes [Bug #16737]
Notes:
Merged: https://github.com/ruby/ruby/pull/2985
|
|
This reverts commit 0bfee2397ba59112902d2b49f08461db3a637b46.
|
|
https://gist.github.com/ko1/a71f7cbcfbd61ba004bffdfedab9f5f2#file-brlog-trunk-random0-20200302-020213-L2127
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2920
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2920
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2794
|
|
warnings
|
|
(old)
test.rb:4: warning: The last argument is used as the keyword parameter
test.rb:1: warning: for `foo' defined here; maybe ** should be added to the call?
(new)
test.rb:4: warning: The last argument is used as keyword parameters; maybe ** should be added to the call
test.rb:1: warning: The called method `foo' is defined here
|
|
This removes the related tests, and puts the related specs behind
version guards. This affects all code in lib, including some
libraries that may want to support older versions of Ruby.
Notes:
Merged: https://github.com/ruby/ruby/pull/2476
|
|
by explicitly removing the old definition.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2484
|
|
Cfuncs that use rb_scan_args with the : entry suffer similar keyword
argument separation issues that Ruby methods suffer if the cfuncs
accept optional or variable arguments.
This makes the following changes to : handling.
* Treats as **kw, prompting keyword argument separation warnings
if called with a positional hash.
* Do not look for an option hash if empty keywords are provided.
For backwards compatibility, treat an empty keyword splat as a empty
mandatory positional hash argument, but emit a a warning, as this
behavior will be removed in Ruby 3. The argument number check
needs to be moved lower so it can correctly handle an empty
positional argument being added.
* If the last argument is nil and it is necessary to treat it as an option
hash in order to make sure all arguments are processed, continue to
treat the last argument as the option hash. Emit a warning in this case,
as this behavior will be removed in Ruby 3.
* If splitting the keyword hash into two hashes, issue a warning, as we
will not be splitting hashes in Ruby 3.
* If the keyword argument is required to fill a mandatory positional
argument, continue to do so, but emit a warning as this behavior will
be going away in Ruby 3.
* If keyword arguments are provided and the last argument is not a hash,
that indicates something wrong. This can happen if a cfunc is calling
rb_scan_args multiple times, and providing arguments that were not
passed to it from Ruby. Callers need to switch to the new
rb_scan_args_kw function, which allows passing of whether keywords
were provided.
This commit fixes all warnings caused by the changes above.
It switches some function calls to *_kw versions with appropriate
kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS
is used. If creating new arguments, RB_PASS_KEYWORDS is used if
the last argument is a hash to be treated as keywords.
In open_key_args in io.c, use rb_scan_args_kw.
In this case, the arguments provided come from another C
function, not Ruby. The last argument may or may not be a hash,
so we can't set keyword argument mode. However, if it is a
hash, we don't want to warn when treating it as keywords.
In Ruby files, make sure to appropriately use keyword splats
or literal keywords when calling Cfuncs that now issue keyword
argument separation warnings through rb_scan_args. Also, make
sure not to pass nil in place of an option hash.
Work around Kernel#warn warnings due to problems in the Rubygems
override of the method. There is an open pull request to fix
these issues in Rubygems, but part of the Rubygems tests for
their override fail on ruby-head due to rb_scan_args not
recognizing empty keyword splats, which this commit fixes.
Implementation wise, adding rb_scan_args_kw is kind of a pain,
because rb_scan_args takes a variable number of arguments.
In order to not duplicate all the code, the function internals need
to be split into two functions taking a va_list, and to avoid passing
in a ton of arguments, a single struct argument is used to handle
the variables previously local to the function.
Notes:
Merged-By: jeremyevans <code@jeremyevans.net>
|
|
|
|
|
|
On Solaris, it seems that the select(3C) in this test works only
when sending 1 byte out-of-band data, though I cannot investigate
the cause. The behavior is observed on a Solaris 10 server in
addition to Solaris 11 on which the test had been skipped.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2395
|
|
These tests were guarded by a RUBY_ENGINE of "ruby" even though they test an official Ruby feature (pread/pwrite added in Ruby 2.5). This commit moves them to the top level of the test case so they will run on other implementations.
Notes:
Merged: https://github.com/ruby/ruby/pull/2412
|
|
|
|
to suppress the leak checker.
|
|
This commit makes it so that if the binmode option is given with
any encoding arguments, the reader and writer IO objects are
not set to binary encoding.
Fixes [Bug #12989]
|
|
When passing `binmode: true` to `IO.pipe`, it should behave the same way
as calling `binmode` on each of the file handles. It should set the
file to binmode *and* set the encoding to binary on the file.
Before this commit, passing `binmode: true` to `IO.pipe` would make
`binmode?` return `true`, but the file's encoding would remain the same
as the default encoding. Passing `binmode: true` should make `binmode?`
return `true` *and* set the encoding to binary.
|
|
|
|
[Bug #12230]
|
|
|
|
* test/lib/test/unit/assertions.rb (assert_cpu_usage_low): apply
the timeout scale to measuring period. this assertion is very
runtime environment dependent.
|
|
* array.c (rb_ary_join_m): warn use of non-nil $,.
* io.c (rb_output_fs_setter): warn when set to non-nil value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
* io.c (rb_io_getline_fast): chomp CR followed by LF but separated
by the read buffer boundary. [ruby-core:91707] [Bug #15642]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
like this:
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1636642
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
to stabilize AIX powerpc CI
https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20181227T113302Z.fail.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
I think I finally fixed the underlying bug in r65937
("io.c (fptr_finalize_flush): close race leading to EBADF")
I've run this test over 100000 times on a multicore system, now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|