aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby
Commit message (Collapse)AuthorAgeFilesLines
...
* Regexp#match{?} with nil raises TypeError as String, Symbol (#1506)Kenichi Kamiya2019-10-171-12/+28
| | | | | | | | | | | | | | | | | | | | | | | * {String|Symbol}#match{?} with nil returns falsy To improve consistency with Regexp#match{?} * String#match(nil) returns `nil` instead of TypeError * String#match?(nil) returns `false` instead of TypeError * Symbol#match(nil) returns `nil` instead of TypeError * Symbol#match?(nil) returns `false` instead of TypeError * Prefer exception * Follow empty ENV * Drop outdated specs * Write ruby/spec for above https://github.com/ruby/ruby/pull/1506/files#r183242981 * Fix merge miss
* Comparable#clamp with a range [Feature #14784]Nobuyoshi Nakada2019-10-161-4/+44
|
* Suppress warnings for Thread.exclusiveNobuyoshi Nakada2019-10-141-0/+7
|
* Import StringScanner 1.0.3 (#2553)Sutou Kouhei2019-10-142-3/+41
|
* Revert "Simplify bin_path_spec.rb guard"Takashi Kokubun2019-10-031-1/+1
| | | | | | | | This reverts commit a56d742e69aa8a3a1fe92fc515d93f6e51cf5fbc. I was checking the CI result of the wrong revision. It actually worked fine https://ci.appveyor.com/project/ruby/ruby/builds/27866303. Never mind...
* Simplify bin_path_spec.rb guardTakashi Kokubun2019-10-031-1/+1
| | | | | For some reason the guard_not seems not working as expected https://ci.appveyor.com/project/ruby/ruby/builds/27866153/job/v6wa6q6p7b7n7r37
* bin_path_spec.rb has failed from the beginningTakashi Kokubun2019-10-031-1/+1
| | | | | for mswin. This spec is not valid for mswin platform. https://ci.appveyor.com/project/ruby/ruby/builds/27748774/job/85khngfpc806m5lj
* Treat return in block in class/module as LocalJumpError (#2511)Jeremy Evans2019-10-021-10/+11
| | | | | | return directly in class/module is an error, so return in proc in class/module should also be an error. I believe the previous behavior was an unintentional oversight during the addition of top-level return in 2.4.
* Update to ruby/spec@2699ea4Benoit Daloze2019-09-292-12/+15
|
* Fix or suppress keyword argument separation warnings in util_specJeremy Evans2019-09-292-8/+24
| | | | | | | | | | | Some warnings are because the @o.rb_scan_args call doesn't include keyword arguments, but the first argument is passed to rb_scan_args may have a last hash treated as keywords. Those should be handled using rb_scan_args_kw on Ruby 2.7. Other warnings are for the deprecated rb_scan_args behavior to split option hashes or treat a nil argument as an option hash. Those warnings should just be suppressed.
* Update to ruby/spec@34e6246Benoit Daloze2019-09-2935-133/+127
|
* Skip default gemspecs spec if the default_specifications_dir cannot be foundBenoit Daloze2019-09-291-4/+9
|
* Update to ruby/spec@e69a14cBenoit Daloze2019-09-298-8/+158
|
* Update to ruby/spec@519df35Benoit Daloze2019-09-2983-308/+1416
|
* [EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return ↵Jean Boussier2019-09-273-0/+30
| | | | | | | | a frozen String * Always the same frozen String for each of these values. * Avoids extra allocations whenever calling these 3 methods. * See [Feature #16150]
* [EXPERIMENTAL] Make Module#name return a frozen StringJean Boussier2019-09-261-5/+19
| | | | | | * Always the same frozen String for a given Module or Class. * Avoids extra allocations whenever calling Module#name. * See [Feature #16150]
* [EXPERIMENTAL] Make Symbol#to_s return a frozen StringBenoit Daloze2019-09-261-0/+17
| | | | | | * Always the same frozen String for a given Symbol. * Avoids extra allocations whenever calling Symbol#to_s. * See [Feature #16150]
* Fix documentation for ENV.each to return ENVJeremy Evans2019-09-201-1/+1
| | | | | | | | Also have spec check that it returns ENV. Mostly from burdettelamar@yahoo.com (Burdette Lamar). Fixes [Bug #16164]
* Removed Scanf from the ruby repository.Hiroshi SHIBATA2019-09-208-160/+0
|
* Removed CMath from the ruby repository.Hiroshi SHIBATA2019-09-2036-835/+0
|
* Allow calling a private accessor with `self.`Nobuyoshi Nakada2019-09-202-1/+3
| | | | [Feature #11297] [Feature #16123]
* Added version guardNobuyoshi Nakada2019-09-201-4/+12
| | | | [Feature #11297] [Feature #16123]
* Allow calling a private method with `self.`Dylan Thacker-Smith2019-09-201-1/+1
| | | | | | | | | | This makes it consistent with calling private attribute assignment methods, which currently is allowed (e.g. `self.value =`). Calling a private method in this way can be useful when trying to assign the return value to a local variable with the same name. [Feature #11297] [Feature #16123]
* Refine Timezone fixtureNobuyoshi Nakada2019-09-153-18/+39
|
* Make test-all and test-spec runnable on AndroidYusuke Endoh2019-09-093-3/+3
| | | | | | Calling some syscall functions such as Dir.chroot causes SIGSYS instead of EPERM on Android. This change skips all tests that stops the test-suite run.
* Improve Proc#to_s specsBenoit Daloze2019-09-081-7/+9
|
* Removed useless braces to suppress a warningNobuyoshi Nakada2019-09-081-2/+2
|
* armv7l and armv7l are the same platform, generalize to armv7Benoit Daloze2019-09-071-1/+1
| | | | [Bug #16007]
* Add `File.absolute_path?` (#2198)David Rodríguez2019-09-051-0/+53
| | | | | In order to check whether a path is absolute or not in a portable way. [Feature #15868]
* Remove bad expectation in specJeremy Evans2019-09-031-1/+0
| | | | | This spec should not be checking where methods are defined, only that the method works as expected (returns a Lazy instance).
* Prohibit nul-separated glob pattern [Feature #14643] (#2419)Nobuyoshi Nakada2019-09-021-1/+7
|
* Warn for keyword to last hash parameter when method has no optional/rest ↵Jeremy Evans2019-08-301-4/+12
| | | | | | | | | parameters Previously, there was no warning in this case, even though we will be changing the behavior in Ruby 3. Fixes [Bug #14130]
* Update specs to handle non-Symbols for keyword splats in 2.7Jeremy Evans2019-08-305-150/+378
| | | | Also handle some warnings for behavior that will change in 3.0.
* spec/ruby/core/unboundmethod/bind_call_spec.rb: Add ruby_version_is guardYusuke Endoh2019-08-301-36/+38
|
* spec/ruby/core/unboundmethod/bind_call_spec.rb: AddedYusuke Endoh2019-08-301-0/+50
| | | | | For UnboundMethod#bind_call [Feature #15955] introduced in 002e592e0d67bb0271d16314a32380ad947c9ae9.
* Fixed a comment [ci skip]Nobuyoshi Nakada2019-08-291-1/+1
| | | | | | A range literal in conditional expression is turned into a flip-flop, as a Range object is never falsy and does not make a sense.
* Revert "Remove warnings of flip-flop deprecation from tests and specs"Nobuyoshi Nakada2019-08-293-15/+10
| | | | | | | | This reverts commit bf7a32d22079cc44eb19794e41d82b886d5d17b3. flip-flop is no longer deprecated. [Feature #5400]
* Follows callback declaration updatesNobuyoshi Nakada2019-08-284-11/+16
|
* Fix rb_thread_create argument typeTakashi Kokubun2019-08-271-1/+1
| | | | | | | | | | in response to the declaration change in e3fc30564e9466d6926f9d25a090dcf787bd5c33. Fixing the AppVeyor mswin CI failure: https://ci.appveyor.com/project/ruby/ruby/builds/26980881/job/2j6h1qwjnbc8cpop ref: https://github.com/ruby/ruby/pull/2404
* Move fixture path to last pathHiroshi SHIBATA2019-08-171-1/+1
|
* change Proc#to_s format ('@...' -> ' ...') (#2362)Koichi Sasada2019-08-141-4/+4
| | | | | | | | Now Proc#to_s returns "#<Proc:0x00000237a0f5f170@t.rb:1>". However, it is convenient to select a file name by (double-)clicking on some terminals by separating ' ' instead of '@' like "#<Proc:0x00000237a0f5f170 t.rb:1>" [Feature #16101]
* Fix typo: duplicated the [skip-ci]ohbarye2019-08-092-2/+2
|
* Suppress warnings against locations in evalNobuyoshi Nakada2019-08-032-11/+11
|
* Split in two spec examplesBenoit Daloze2019-07-311-1/+3
|
* Attempt to fix Hash#rehash specBenoit Daloze2019-07-311-9/+12
|
* delete a check on bad assumption.Koichi Sasada2019-07-311-1/+5
| | | | | | If object was modified, but there is a case that hash values (#hash) are same between before modified and after modified objects.
* Warn if using return at top-level with an argumentJeremy Evans2019-07-291-6/+19
| | | | Fixes [Bug #14062]
* Update to ruby/spec@0526d8fBenoit Daloze2019-07-271-2/+2
|
* Update to ruby/spec@875a09eBenoit Daloze2019-07-271247-5031/+5319
|
* Initialize DST flagNobuyoshi Nakada2019-07-271-1/+1
| | | | | * time.c (zone_timelocal): initialize DST flag by asking the timezone object. [Bug #15988]