Skip to content

Commit f5783c9

Browse files
committed
update rubyspec to 5f056fed877d09b8f68a58eaa50e35766e4ac8de
1 parent 7422160 commit f5783c9

593 files changed

Lines changed: 14387 additions & 3716 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

spec/frozen/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
optional/ffi/fixtures/build
1414
jruby.1.8.mspec
1515
jruby.1.9.mspec
16+
rubyspec_temp
1617

1718
# We have to generate this file because it was removed in 1.9.
1819
optional/capi/ext/rubyspec_version.h

spec/frozen/.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: ruby
2+
script:
3+
- bundle exec mspec .
4+
rvm:
5+
- 1.8.7
6+
- 1.9.3
7+
- ruby-head
8+
- jruby-18mode
9+
- jruby-19mode
10+
- jruby-head
11+
- rbx-18mode
12+
- rbx-19mode
13+
- rbx-head
14+
- ree
15+
jdk:
16+
- openjdk7
17+
allow_failures:
18+
- rvm: ruby-head
19+
- rvm: jruby-head
20+
- rvm: rbx-head
21+
notifications:
22+
recipients:
23+
- brixen@gmail.com

spec/frozen/CHANGES.before-2008-05-10

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Date: Thu May 1 10:48:20 2008 -0700
309309

310310
This is the result of ping-pong between Evan and Wilson. It refactors
311311
out enclosing_class from being used, and instead information is always
312-
pulled directly from the ConstantScope object. This lets us inject proper
312+
pulled directly from the StaticScope object. This lets us inject proper
313313
scoping changes in ruby.
314314

315315
commit 2db27aef88e2ca7752beba846d172ede276275e0
@@ -10207,8 +10207,8 @@ Date: Wed Dec 5 14:42:27 2007 -0800
1020710207
Vastly simplify and fix constant lookup
1020810208

1020910209
* New constant lookup specs to test behavior
10210-
* Added ConstantScope object and field on CompiledMethod which stores
10211-
a ConstantScope instance which indicates the lexical scope of the CM.
10210+
* Added StaticScope object and field on CompiledMethod which stores
10211+
a StaticScope instance which indicates the lexical scope of the CM.
1021210212

1021310213
commit 163e56646a817301201af843b45c973da058688c
1021410214
Author: Tilman Sauerbeck <tilman@code-monkey.de>

spec/frozen/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
gem 'mspec', :github => 'rubyspec/mspec'
3+
gem 'ffi', :github => 'ffi/ffi'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ The RubySpec files are written using RSpec-compatible syntax. MSpec is a
66
purpose-built framework for running RubySpec. For more information, see the
77
http://github.com/rubyspec/mspec project.
88

9+
[![Build Status](https://travis-ci.org/rubyspec/rubyspec.png)](https://travis-ci.org/rubyspec/rubyspec)
910

1011
1. Installing MSpec
1112

spec/frozen/command_line/dash_upper_e_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
:args => '2>&1').should =~ /RuntimeError/
77
end
88
end
9-
end
9+
end

spec/frozen/core/array/choice_spec.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33

44
describe "Array#choice" do
55
ruby_version_is "1.8.7"..."1.9" do
6-
it "selects a random value from the array" do
7-
a = [1,2,3,4]
8-
10.times { a.include?(a.choice).should be_true }
6+
it "returns a value from the array" do
7+
[4].choice.should eql(4)
8+
end
9+
10+
it "returns a distribution of results" do
11+
source = [0,1,2,3,4]
12+
choices = ArraySpecs::SampleRange.collect { |el| source.choice }
13+
choices.uniq.sort.should == source
914
end
1015

1116
it "returns nil for empty arrays" do

spec/frozen/core/array/delete_spec.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,34 @@ def x.==(other) 3 == other end
1414
a.should == [1, 2, 4, 5]
1515
end
1616

17+
ruby_version_is '1.8.7' ... '1.9' do
18+
it "returns the argument" do
19+
x = mock('delete')
20+
y = mock('delete_more')
21+
def x.==(other) 3 == other end
22+
def y.==(other) 3 == other end
23+
24+
a = [1, 2, 3, 4, 3, 5, x]
25+
26+
ret = a.delete y
27+
ret.should equal(y)
28+
end
29+
end
30+
31+
ruby_version_is '1.9' ... '2.0' do
32+
it "returns the last element in the array for which object is equal under #==" do
33+
x = mock('delete')
34+
y = mock('delete_more')
35+
def x.==(other) 3 == other end
36+
def y.==(other) 3 == other end
37+
38+
a = [1, 2, 3, y, 4, 3, 5, x]
39+
40+
ret = a.delete 3
41+
ret.should equal(x)
42+
end
43+
end
44+
1745
it "calculates equality correctly for reference values" do
1846
a = ["foo", "bar", "foo", "quux", "foo"]
1947
a.delete "foo"

spec/frozen/core/array/fixtures/classes.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def pack_format(count=nil, repeat=nil)
99
end
1010

1111
module ArraySpecs
12+
SampleRange = 0..1000
13+
SampleCount = 1000
14+
1215
not_compliant_on :rubinius do
1316
def self.max_32bit_size
1417
2**32/4

spec/frozen/core/array/fixtures/encoded_strings.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ def self.array_with_usascii_and_ascii8bit_strings
6666
"\xFF".force_encoding('ASCII-8BIT')
6767
]
6868
end
69-
end
69+
end

0 commit comments

Comments
 (0)