Commit graph

1000 commits

Author SHA1 Message Date
Nobuyoshi Nakada
108f7536b3
Removed unnecessary chomp
As `String#split` with the default argument drops trailing newline
as a separator, preceding `String#chomp` is futile.
2020-03-07 17:04:37 +09:00
Kazuhiro NISHIYAMA
fcd605020b
Fix a typo 2020-03-07 13:49:28 +09:00
Yusuke Endoh
17d5efa4fe spec/ruby/core/process/exec_spec.rb: remove a guard for openbsd
openbsd current seems to behave the same as other OSs.

20200305T063005Z.fail.html.gz
2020-03-05 18:25:47 +09:00
Nobuyoshi Nakada
af1863734c
Adjust types 2020-02-29 21:42:38 +09:00
dependabot[bot]
02a3e27608
Bump rake from 10.5.0 to 12.3.3 in /spec/mspec (#2942)
Bumps [rake](https://github.com/ruby/rake) from 10.5.0 to 12.3.3.
- [Release notes](https://github.com/ruby/rake/releases)
- [Changelog](https://github.com/ruby/rake/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rake/compare/v10.5.0...v12.3.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-28 10:13:28 -08:00
Benoit Daloze
a0f5ff4c3c Update to ruby/spec@41bf282 2020-02-28 19:07:17 +01:00
Benoit Daloze
5d21050182 Update to ruby/mspec@a514ad7 2020-02-28 19:07:14 +01:00
Jeremy Evans
54499d7810 Remove support for passing nil to IO#ungetc
Fixes [Bug #13675]
2020-02-27 10:17:54 -08:00
Nobuyoshi Nakada
8a7e0aaaef
Warn non-nil $/ [Feature #14240] 2020-02-23 13:37:40 +09:00
Nobuyoshi Nakada
6298ec2875
Warn non-nil $\ [Feature #14240] 2020-02-23 13:37:40 +09:00
Benoit Daloze
4aebb49153 Expand Symbol#to_proc specs to be clearer 2020-02-22 14:43:52 +01:00
Nobuyoshi Nakada
5b29ea0845
Proc from Symbol needs a receiver
So its arity should be -2 instead of -1.

[Bug #16640]
https://bugs.ruby-lang.org/issues/16640#change-84337
2020-02-22 10:49:59 +09:00
Nobuyoshi Nakada
f0b815dc67
Proc made by Symbol#to_proc should be a lambda [Bug #16260] 2020-02-19 15:46:26 +09:00
Yusuke Endoh
6bfc576271 spec/ruby/library/socket/constants/constants_spec.rb: skip on Android
IP_MAX_MEMBERSHIPS seems not to be defined on Android
2020-02-13 23:16:10 +09:00
Yusuke Endoh
bbc6799334 spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb: skip on Android
FreeBSD's GETNAMEINFO(3) says:

> If a link-layer address or UNIX-domain address is passed to
> getnameinfo(), its ASCII representation will be stored in host.  The
> string pointed to by serv will be set to the empty string if non-NULL;
> flags will always be ignored.

Android seems to behave like FreeBSD.
2020-02-13 23:13:17 +09:00
Yusuke Endoh
09a042ae04 spec/ruby/library/etc/: skip the specs related to group on Android
User/group system on Android seems different from normal Linux.
2020-02-13 23:11:28 +09:00
Yusuke Endoh
db8c8c0916 spec/ruby/library/socket/addrinfo: skip the specs that uses SOCK_SEQPACKET on Android
SOCK_SEQPACKET seems not to be supported on Android
2020-02-13 23:10:03 +09:00
Yusuke Endoh
89bfad17d5 spec/ruby/library/syslog: skip the specs that use LOG_PERROR on Android
LOG_PERROR is defined on Android, but not implemented yet.
See also f3c4e620ac.
2020-02-13 23:08:31 +09:00
Yusuke Endoh
c6ebbbd38b spec/ruby: skip the specs that use /etc/passwd on Android
There is no /etc/passwd on Android
2020-02-13 23:06:33 +09:00
Yusuke Endoh
ca53ab581b spec/ruby/library/etc/confstr_spec.rb: skip on Android
There seems to be no _CS_PATH on Android.
2020-02-13 23:04:15 +09:00
Yusuke Endoh
02233e171c spec/ruby/core/process/spawn_spec.rb: Use / instead of /tmp
because there is no /tmp on Android.
2020-02-13 23:03:07 +09:00
Yusuke Endoh
ed549f80b6 spec/ruby/core/process/clock_getres_spec.rb: skip on Android
in the same way as FreeBSD and OpenBSD.
I guess that the spec makes too strong assumption.
2020-02-13 23:00:30 +09:00
Yusuke Endoh
022268ae00 spec/ruby/core/encoding/locale_charmap_spec.rb: locale_charmap is UTF-8 on Android
nl_langinfo(CODESET) always returns UTF-8 on Android, regardless to
LC_ALL=C.
2020-02-13 23:00:03 +09:00
Yusuke Endoh
a11fa7d8cd spec/ruby/core/dir/home_spec.rb: exclude Android
I couldn't find a robust way to get the home path except ENV["HOME"] on
Android Termux.
2020-02-13 22:56:42 +09:00
Jeremy Evans
7a288df7b8 Make yield in singleton class definitions in methods a SyntaxError
This behavior was deprecated in 2.7 and scheduled to be removed
in 3.0.

Calling yield in a class definition outside a method is now a
SyntaxError instead of a LocalJumpError, as well.
2020-02-11 12:44:23 -08:00
Nobuyoshi Nakada
92c86e39de
Removed a useless guard
MSpec requires Ruby 2.4 or more recent.
2020-02-09 12:13:28 +09:00
Yusuke Endoh
2173ae7801 spec/ruby/core/file/utime_spec.rb: far future timestamp may be trancated
Under some Ext4 filesystem settings, a timestamp is limited up to
0x37fffffff (2446-05-10).

https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inode_Timestamps
> Therefore, timestamps should not overflow until May 2446.

Actually the spec fails under one of our CI environments, like:

```
1)
File.utime allows Time instances in the far future to set mtime and atime FAILED
Expected 2446 == 559444
to be truthy but was false
```
20200208T180002Z.fail.html.gz
2020-02-09 11:13:06 +09:00
Nobuyoshi Nakada
80cbf97918
[DOC] Added 2.7.x to the latest stable versions [ci skip] 2020-02-08 19:48:31 +09:00
Nobuyoshi Nakada
739fdb7ff0
[ruby/spec] Don't care about return values
RDoc says nothing about them.  Added an example that
ConditionVariable#wait can be woken up by
ConditionVariable#signal, instead.
2020-02-06 15:42:36 +09:00
Nobuyoshi Nakada
32adae431d
[ruby/spec] Just test that sleep completes 2020-02-06 15:42:16 +09:00
Nobuyoshi Nakada
3d83e641b1
[ruby/spec] Check by Thread#stop?
Check if threads are stopped by Thread#stop? instead of the status
name.
2020-02-06 14:50:32 +09:00
Benoit Daloze
809f0b8a13 Update to ruby/spec@f8a2d54 2020-01-28 20:47:48 +01:00
Benoit Daloze
ed377cc9aa Update to ruby/mspec@9bce874 2020-01-28 20:47:46 +01:00
Jeremy Evans
766f8a7a60 Fix some spec breakage on 2.7 related to keyword arguments
These specs were probably added in the commit to fully
separate keyword arguments after the release of 2.7.0, but
apparently not tested on 2.7 before hand. The enclosing
ruby_version guard for these specs limits them to 2.7.
2020-01-28 09:26:02 -08:00
Benoit Daloze
fe8573f31a Run specs against the latest release of 2.4 2020-01-28 18:12:24 +01:00
Benoit Daloze
0ad0e63887 Fix version guard in __dir__ spec 2020-01-28 18:01:59 +01:00
Nobuyoshi Nakada
9b55a9649f
Removed useless "spec"s
It is not specific to particular methods that keyword option
arguments are coerced to `Hash`es using `to_hash` method.
2020-01-27 10:19:09 +09:00
Nobuyoshi Nakada
d4e1d4e94e
Moved Array#sample to rbinc 2020-01-26 19:45:58 +09:00
Nobuyoshi Nakada
29eb1b1602
Moved Array#shuffle and Array#shuffle! to rbinc 2020-01-26 19:40:34 +09:00
Yusuke Endoh
4396ced07d spec/ruby/core/process/times_spec.rb: add an output code for debugging 2020-01-25 19:48:10 +09:00
Nobuyoshi Nakada
109183c2c0
Guarded the examples for deprecated "taint" 2020-01-23 22:03:13 +09:00
Kazuhiro NISHIYAMA
ac93cf4ff8
Update version guard
fix up 98ef38ada4
2020-01-15 10:50:53 +09:00
Jean Boussier
98ef38ada4 Freeze Regexp literals
[Feature #8948] [Feature #16377]

Since Regexp literals always reference the same instance,
allowing to mutate them can lead to state leak.
2020-01-15 10:38:47 +09:00
Hiroshi SHIBATA
c7ef7d8a73 Also ignored cve_2014_8080_spec 2020-01-12 12:28:29 +09:00
Hiroshi SHIBATA
e61cab3a36 Ignore rexml examples on ruby/spec 2020-01-12 12:28:29 +09:00
Nobuyoshi Nakada
b0e9db65c3
Include the standard id command output
On macOS, GNU coreutils `id` is limited to NGROUPS_MAX groups,
because of the backward compatibility of getgroups(2).
2020-01-09 15:58:46 +09:00
Hiroshi SHIBATA
13f4f07f21 Merge bundler-2.1.4 2020-01-08 18:00:32 +09:00
Jeremy Evans
0eeed5bcc5 Make eval(code, binding) use (eval) as __FILE__ and 1 as __LINE__
This removes the warning that was added in
3802fb92ff, and switches the behavior
so that the eval does not use the binding's __FILE__ and __LINE__
implicitly.

Fixes [Bug #4352]
2020-01-03 20:13:09 -08:00
Jeremy Evans
e014e6bf66 Update specs for keyword argument separation 2020-01-02 18:40:45 -08:00
Sutou Kouhei
e1c363f847
[bundler/bundler] Add ruby2_keywords
29d932d72d
2020-01-01 07:41:37 +09:00