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

1363 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada 82b6f89283 File.dirname optional level
* file.c (rb_file_dirname_n): chomp N level of base names.
  [Feature #12194]
2021-03-15 15:09:05 +09:00
David Rodríguez 53468cc111 Sync latest development version of bundler & rubygems 2021-03-08 13:47:35 +09:00
Benoit Daloze 80e2c45f55 Skip spec which does not work on mingw
* https://github.com/ruby/ruby/runs/1994688198
  ruby 3.1.0dev (2021-02-27T16:42:17Z master 8305a48413) [x64-mingw32]
  C-API Thread function rb_thread_call_without_gvl runs a C function with the global lock unlocked and unlocks IO with the generic RUBY_UBF_IO
  Example took longer than the configured timeout of 60.0s
2021-02-28 12:24:42 +01:00
Benoit Daloze 36dde35e02 Update to ruby/spec@37e52e5 2021-02-27 13:00:26 +01:00
Jeremy Evans cfd162d535 Make String#{strip,lstrip}{,!} strip leading NUL bytes
The documentation already specifies that they strip whitespace
and defines whitespace to include null.

This wraps the new behavior in the appropriate guards in the specs,
but does not specify behavior for previous versions, because this
is a bug that could be backported.

Fixes [Bug #17467]
2021-02-20 11:17:47 +09:00
Kazuhiro NISHIYAMA 96228e3ed6
Fix a spec failure
http://ci.rvm.jp/logfiles/brlog.trunk-test.20210216-182358
```
1)
$LOAD_PATH.resolve_feature_path raises LoadError if feature cannot be found FAILED
Expected LoadError but no exception was raised (nil was returned)
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1275:in `block (3 levels) in <top (required)>'
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1259:in `block in <top (required)>'
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1258:in `<top (required)>'
```
2021-02-16 18:52:40 +09:00
Nobuyoshi Nakada 1f0e0dfb22
Thread::Queue.new should accept an Enumerable [Feature #17327]
Enumerable implements #to_a but not #to_array.
2021-02-12 12:21:49 +09:00
Chris Seaton c3b2bb0969
The Queue constructor should take an initial set of objects
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-02-11 19:14:18 +09:00
Kazuhiro NISHIYAMA f600226fb4
Fix failures with EditLine
On macOS with EditLine:
```
$ ruby -r readline -e 'Readline.readline("> "); p Readline::VERSION' < /dev/null
"EditLine wrapper"
```

On Linux with GNU readline:
```
$ ruby -r readline -e 'Readline.readline("> "); p Readline::VERSION' < /dev/null
> "8.0"
```
2021-02-03 14:38:31 +09:00
Kazuhiro NISHIYAMA acb6b395b6
Fix failure when build in srcdir/build
If `build` directory exists, `rake build` is `Rake::FileTask`.
So skip if exists.
2021-01-29 11:59:42 +09:00
Nobuyoshi Nakada 522adbc945 Fixed Kernel#rand spec
Float should not be compared by identity.
2021-01-29 11:36:13 +09:00
Benoit Daloze 2e32b919b4 Update to ruby/spec@8cafaa5 2021-01-28 17:08:57 +01:00
Kazuhiro NISHIYAMA 1b377b32c8
Add fallback when PWD is not set 2021-01-28 18:23:13 +09:00
Kazuhiro NISHIYAMA 763d242fcd
Use PWD instead of source_root
Because `.ext/common` is not relative from top source directory.
Fix failures with out-of-place build directory.
2021-01-28 18:01:06 +09:00
Kazuhiro NISHIYAMA 7cd97a81d1
Remove require_path from $LOADED_FEATURES
because some features are already loaded.
2021-01-28 18:00:10 +09:00
Kazuhiro NISHIYAMA 00bd645f09
Delete path including `/../` too 2021-01-28 18:00:10 +09:00
Nobuyoshi Nakada b409a34b41
Taint flags has been deprecated in 3.1 2021-01-27 14:45:31 +09:00
Gannon McGibbon 9e0075a3d9 Replace "iff" with "if and only if"
iff means if and only if, but readers without that knowledge might
assume this to be a spelling mistake. To me, this seems like
exclusionary language that is unnecessary. Simply using "if and only if"
instead should suffice.
2021-01-19 12:06:45 -08:00
Nobuyoshi Nakada c3d6bac325
Upcoming Struct#new behavior 2021-01-18 15:55:10 +09:00
Takashi Kokubun e1fee7f949
Rename RubyVM::MJIT to RubyVM::JIT
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]
2021-01-13 22:46:51 -08:00
Nobuyoshi Nakada 7dc0511ea4 Remove "." and ".." from Dir.glob with FNM_DOTMATCH [Bug #17280]
Co-authored-by: Jeremy Evans <code@jeremyevans.net>
2021-01-12 20:02:43 +09:00
Nobuyoshi Nakada 5e00eeb4d4
[ruby/matrix] use an exclusive range [Bug #17521] 2021-01-11 14:00:35 +09:00
Marc-André Lafortune d8c8b79d24
[ruby/matrix] Fix 0-th power [Bug #17521] (#4047) 2021-01-10 16:21:10 -05:00
Hiroshi SHIBATA 69ed64949b Track Bundler master(2.3.0.dev) branch at 55634a8af18a52df86c4275d70fa1179118bcc20 2021-01-04 13:14:43 +09:00
Nobuyoshi Nakada 64d79d333b
Suppress too big exponent warnings 2020-12-28 12:12:54 +09:00
Benoit Daloze 727c97da19 Update to ruby/spec@4ce9f41 2020-12-27 17:35:32 +01:00
Benoit Daloze 267bed0cd9 Update to ruby/mspec@a40a674 2020-12-27 17:35:30 +01:00
Marcus Stollsteimer 93a1ef6709 Fix typos 2020-12-24 23:20:04 +01:00
Jeremy Evans 1e215a66d2 Fix class of method in Method#inspect for singleton classes of classes
Previously, due to a change to fix bug 15608, Method#inspect output
changed for class methods:

Ruby 2.7
"#<Method: String.prepend(*)>"

Before change:
"#<Method: #<Class:Object>(Module)#prepend(*)>"

This is wrong because the Method object was created from String and
not Object. This is because the fix for bug 15608 assumed it was
being called on the singleton class of a instance, and would skip
the first singleton class until it got to the class itself.  For
class methods, this results in always using the superclass. Fix
behavior to not skip until the superclass if the singleton class
is the singleton class of a module or class.

After change:
"#<Method: #<Class:Object>(Module)#prepend(*)>"

Fixes [Bug #17428]
2020-12-23 19:29:19 -08:00
Hiroshi SHIBATA 339227363c Merge RubyGems 3.2.3 and Bundler 2.2.3 2020-12-23 10:17:41 +09:00
卜部昌平 fa356a798a Enumerator.new: raise unless block given
Has been deprecated since c73b6bd7eb.
[Feature #17116] [ruby-dev:50945]
2020-12-22 13:52:03 +09:00
Nobuyoshi Nakada a29b9e5efe
Remvoed no longer needed version guards 2020-12-22 07:52:14 +09:00
Nobuyoshi Nakada 8918a9cf6c Removed rb_cData entity
* Use the wrapper of rb_cObject instead of data access
* Replaced rest of extentions
* Updated the version guard for Data
* Added the version guard of rb_cData
2020-12-22 02:51:49 +09:00
卜部昌平 c30f03d328 Data: delete
Has been deprecated since 684bdf6171.

Matz says in [ruby-core:83954] that Data should be an alias of Object.
Because rb_cData has not been deprecated, let us deprecate the constant
to make it a C-level synonym of rb_cObject.
2020-12-22 02:51:49 +09:00
Kazuhiro NISHIYAMA 63849a1cd9
Fix misspellings [ci skip] 2020-12-21 10:54:24 +09:00
Nobuyoshi Nakada 9c73c75624
Use Integer instead of Fixnum/Bignum 2020-12-21 01:19:55 +09:00
Nobuyoshi Nakada fb8f011422
Fixed indefinite articles before "Integer" [ci skip] 2020-12-21 01:19:55 +09:00
Nobuyoshi Nakada ad534a677a
Fixnum as a Symbol was an old feature until 1.6 2020-12-21 01:19:55 +09:00
Nobuyoshi Nakada ed4381d941
BigDecimal#precs is deprecated 2020-12-20 03:14:58 +09:00
Radosław Bułat eb8ea336d3 Feature 17314: allow to pass array to public, protected and private methods 2020-12-19 18:19:49 +09:00
Marc-Andre Lafortune 0d3dc2ec80 Make `Hash#except` always return a Hash
[Feature #15822]
2020-12-19 03:59:51 -05:00
Radosław Bułat 51bcd50915 Feature 17314: alias_method returns symbol 2020-12-19 12:23:58 +09:00
Yusuke Endoh 346bf0f5a5 spec/ruby/core/module/attr_*: Add version guards 2020-12-19 03:16:20 +09:00
Radosław Bułat 5944c4b3cf
attr_reader, attr_writer, attr_accessor and attr methods returns array of symbols (#3935)
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
2020-12-19 03:11:35 +09:00
Yusuke Endoh 982443e6e3 Revert "Better cooperation between public/protected/private with attr* and alias_method"
This reverts commit 81739ad4fd.
2020-12-18 16:08:55 +09:00
Hiroshi SHIBATA 0e40cc9b19 Merge RubyGems 3.2.2 and Bundler 2.2.2 2020-12-18 13:33:18 +09:00
Radosław Bułat 81739ad4fd Better cooperation between public/protected/private with attr* and alias_method 2020-12-17 12:46:02 -05:00
Marc-Andre Lafortune d5f0d338c7 Optimize `Enumerable#grep{_v}`
[Bug #17030]
2020-12-15 12:54:45 -05:00
Hiroshi SHIBATA 2fa9f3c032 Prepare to release rubygems-3.2.1 and bundler-2.2.1 2020-12-15 10:54:09 +09:00
Benoit Daloze f5c89c1660 Deprecate Random::DEFAULT
* Closes [Feature #17351].
2020-12-14 20:29:50 +01:00