Commit graph

419 commits

Author SHA1 Message Date
Nobuyoshi Nakada
6ab95fb741
Removed twisted tests
Why does only Process.daemon have these tests?
2019-07-16 22:03:25 +09:00
Hiroshi SHIBATA
f73ea3342b
Fixed ruby/spec for Logger::LogDevice changes. 2019-07-15 15:07:26 +09:00
Nobuyoshi Nakada
cd069df365
File::Stat uses Time#inspect 2019-07-11 19:46:11 +09:00
Nobuyoshi Nakada
4e038a7e64
Revert "parse.y: Deprecate flip-flops"
This reverts commit bae638ad5b.

[Feature #5400]
2019-07-11 14:52:02 +09:00
Nobuyoshi Nakada
23c92b6f82
Revert self-referencing finalizer warning [Feature #15974]
It has caused CI failures.

* d0cd0866d8

  Disable GC during rb_objspace_reachable_object_p

* 89cef1c56b

  Version guard for [Feature #15974]

* 796eeb6339.

  Fix up [Feature #15974]

* 928260c2a6.

  Warn in verbose mode on defining a finalizer that captures the object
2019-07-04 04:01:06 +09:00
Nobuyoshi Nakada
89cef1c56b
Version guard for [Feature #15974] 2019-07-03 15:22:16 +09:00
Chris Seaton
928260c2a6
Warn in verbose mode on defining a finalizer that captures the object
[Feature #15974]

Closes: https://github.com/ruby/ruby/pull/2264
2019-07-03 04:05:22 +09:00
Takashi Kokubun
dbe834ab5a
Prefer master rather than trunk in README [ci skip] 2019-07-01 01:05:29 +09:00
Nobuyoshi Nakada
9f648262f9
Fix predicate to assert if object is same 2019-06-29 21:45:59 +09:00
Nobuyoshi Nakada
cbb7dc21a8
Fix predicate to assert if object is same 2019-06-29 19:17:51 +09:00
Benoit Daloze
a2091c3023 Update to ruby/spec@94d98ff 2019-06-27 21:21:33 +02:00
Benoit Daloze
d80e44deec Update to ruby/spec@8d74d49 2019-06-27 21:02:36 +02:00
Hiroshi SHIBATA
e478671e19
Added version guard for backtrace printing feature of psych to ruby/spec. 2019-06-26 09:23:02 +09:00
Hiroshi SHIBATA
d7887b05d8
Fixed broken ruby/spec related a53ab897c3 2019-06-25 16:46:53 +09:00
Nobuyoshi Nakada
97a7f463f6
Max length of UNIX socket path is 104 bytes on macOS 2019-06-23 23:12:47 +09:00
Nobuyoshi Nakada
50b2807a7c
Do not lengthen UNIX socket path
* spec/ruby/library/socket/unixsocket/recvfrom_spec.rb: do not
  lengthen UNIX socket path, which is very stricted.
2019-06-23 23:10:16 +09:00
Kenichi Kamiya
d01fd82187 Alias ENV.merge! as ENV.update
[Feature #15947]

Closes: https://github.com/ruby/ruby/pull/2246
2019-06-21 18:25:01 +02:00
Benoit Daloze
3b2d11ad90 Use different names for autoload constants in specs for clarity 2019-06-21 18:21:45 +02:00
Jean Boussier
e5e811e4a0 Add extra spec from https://github.com/ruby/ruby/pull/2173 2019-06-21 18:21:45 +02:00
Jean Boussier
fb85a42860
Add an optional inherit argument to Module#autoload?
[Feature #15777]

Closes: https://github.com/ruby/ruby/pull/2173
2019-06-21 17:28:37 +09:00
Jeremy Evans
a0af60c7f2 Remove spec testing undefined behavior
Fixes [Bug #15432]
2019-06-19 12:20:30 -07:00
Jeremy Evans
b9ef35e4c6 Implement Complex#<=>
Implement Complex#<=> so that it is usable as an argument when
calling <=> on objects of other classes (since #coerce will coerce
such numbers to Complex).  If the complex number has a zero imaginary
part, and the other argument is a real number (or complex number with
zero imaginary part), return -1, 0, or 1.  Otherwise, return nil,
indicating the objects are not comparable.

Fixes [Bug #15857]
2019-06-19 10:50:58 -07:00
Benoit Daloze
626ae5a9b6 Resolv specs should pass on Windows now 2019-06-10 12:47:08 +02:00
Benoit Daloze
60af6fef3c Fix Resolv specs to not depend on a system /etc/hosts file
* 20190609T153804Z.fail.html.gz
* Thanks @naruse for the tip.
2019-06-10 12:45:00 +02:00
Jeremy Evans
119ca4343c Make specs pass on OpenBSD
Skip Process clockres specs that don't work on either FreeBSD or
Solaris/AIX in addition to OpenBSD.

Run most current String#crypt specs on non-OpenBSD, and add a new
set of crypt specs for OpenBSD, which support bcrypt but not DES
in crypt(3).

Use @server.connect_address instead of @server.getsockname in some
socket tests, as OpenBSD does not treat connection to all zero
IPv4 or IPv6 addresses as connection to localhost.

When trying to connect using UDP on an unsupported address family,
allow Errno::EPROTONOSUPPORT in addition to Errno::EAFNOSUPPORT,
as OpenBSD raises the former.
2019-06-06 21:16:28 -07:00
Nobuyoshi Nakada
aa8a8d8f6d
Split an assertion for f1f04caf60 2019-06-05 12:04:11 +09:00
Nobuyoshi Nakada
22da5d71ea
ruby -v may no longer be ASCII-only on non-master branches 2019-06-03 12:56:36 +09:00
Benoit Daloze
1d37cc1900 Update to ruby/spec@cfe908c 2019-05-31 19:02:08 +02:00
Nobuyoshi Nakada
8b39df854d
Let irb use an empty file as irbrc
to get rid of side-effect by existing .irbrc file.
2019-05-31 16:32:27 +09:00
Nobuyoshi Nakada
b632566d33
UNIX domain socket name length has a certain limit 2019-05-31 16:32:27 +09:00
Benoit Daloze
a4161b7649 Update to ruby/spec@0ba5312 2019-05-30 22:11:24 +02:00
Takashi Kokubun
5379ca9250
Skip spec broken since a66bc2c011
This has not worked since the merge 538438184
2019-05-29 14:57:25 +09:00
Nobuyoshi Nakada
8552e9d696
Fix shorten-64-to-32 warning 2019-05-29 13:24:24 +09:00
Benoit Daloze
91f5a8db59 Update to ruby/spec@0c5c5c1 2019-05-28 23:15:57 +02:00
Benoit Daloze
a66bc2c011 Update to ruby/spec@9a501a8 2019-05-28 22:41:48 +02:00
Jeremy Evans
39eadca76b Add FrozenError#receiver
Similar to NameError#receiver, this returns the object on which
the modification was attempted.  This is useful as it can pinpoint
exactly what is frozen.  In many cases when a FrozenError is
raised, you cannot determine from the context which object is
frozen that you attempted to modify.

Users of the current rb_error_frozen C function will have to switch
to using rb_error_frozen_object or the new rb_frozen_error_raise
in order to set the receiver of the FrozenError.

To allow the receiver to be set from Ruby, support an optional
second argument to FrozenError#initialize.

Implements [Feature #15751]
2019-05-26 11:09:21 -07:00
Benoit Daloze
2d34087a38 Add notes for the Process#clock_getres spec 2019-05-24 14:48:10 +02:00
Benoit Daloze
4541d2effe Only exclude the failing clocks for Process.clock_getres specs on AIX
* 20190522T103301Z.fail.html.gz
2019-05-24 14:29:47 +02:00
Yusuke Endoh
50e993d4e3 Skip the Process.clock_getres spec on AIX
20190522T103301Z.fail.html.gz
2019-05-24 12:17:05 +09:00
manga_osyo
f5415a95ce
Add Time#ceil.
Closes: https://github.com/ruby/ruby/pull/2133
2019-05-23 22:30:19 +09:00
Alfonso Jiménez
0acbdd1ed0
Adding Enumerable#filter_map
[Feature #15323]
Closes: https://github.com/ruby/ruby/pull/2017
2019-05-23 14:39:16 +09:00
Yusuke Endoh
00f7e42451 spec/ruby/core/hash/constructor_spec.rb: add "ruby_version_is" guard
follow up for d3f1c615c5
2019-05-23 01:46:21 +09:00
Yusuke Endoh
d3f1c615c5 hash.c (rb_hash_s_create): Reject Hash[[nil]]
The behavior of `Hash[[nil]] #=> {}` was a bug until 1.9.3, but had been
remained with a warning because some programs depended upon it.
Now, six years passed.  We can remove the compatibility behavior.
[Bug #7300]
2019-05-23 00:19:56 +09:00
Alan Wu
b00f280d4b
Eagerly name modules and classes
* variable.c: make the hidden ivars `classpath` and `tmp_classpath` the source
  of truth for module and constant names. Assign to them when modules are bind
  to constants.

* variable.c: remove references to module name cache, as what used to be the cache
  is now the source of truth. Remove rb_class_path_no_cache().

* variable.c: remove the hidden ivar `classid`. This existed for the purposes of
  module name search, which is now replaced. Also, remove the associated
  rb_name_class().

* class.c: use rb_set_class_path_string to set the name of Object during boot.
  Must use a fstring as this runs before rb_cString is initialized and
  creating a normal string leads to a VALUE without a class.

* spec/ruby/core/module/name_spec.rb: add a few specs to specify what happens
  to Module#name across multiple operations. These specs pass without other
  code changes in this commit.

[Feature #15765]
2019-05-22 15:46:47 +09:00
Benoit Daloze
8c8f2d97cf Remove redundant ignore rule for Process#clock_getres specs 2019-05-20 10:41:57 +02:00
Benoit Daloze
2a34543e11 Move exclusion for Hyper-V next to other skipped constants 2019-05-20 10:41:40 +02:00
Koichi Sasada
ab0f2deab1 skip a test for CLOCK_MONOTONIC_RAW.
On my Linux guest machine on Hyper-V, I got an error.
Process.clock_gettime(CLOCK_MONOTONIC_RAW, :nanosecond) returns like:

  ...
  875573945119100
  875573945119600
  ...

even if `Process.clock_getres(value, :nanosecond)` returns 1.
So I simply skip this test for CLOCK_MONOTONIC_RAW.
2019-05-20 14:43:04 +09:00
Nobuyoshi Nakada
a85ed43294
Do not access the internal member 2019-05-10 09:00:25 +09:00
Nobuyoshi Nakada
d736080c8b
Use ruby_bug guard 2019-05-08 15:45:13 +09:00
Takashi Kokubun
a7cbb65956
Do not break rubyspec for old Ruby
Fixing 7d805e67f3
2019-05-08 15:13:34 +09:00