Skip to content

Commit 2f8f3cc

Browse files
committed
[GR-14806] Update specs.
PullRequest: truffleruby/750
2 parents 31b74b1 + 7c69a53 commit 2f8f3cc

File tree

26 files changed

+383
-367
lines changed

26 files changed

+383
-367
lines changed

lib/truffle/rbconfig.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ module RbConfig
109109
mkconfig['RUBY_SO_NAME'] = '$(RUBY_BASE_NAME)'
110110

111111
ruby_home = Truffle::Boot.ruby_home
112+
TOPDIR = ruby_home
112113

113114
if ruby_home
114115
prefix = ruby_home

spec/ruby/.mspec.constants

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ IncludeSpecsClass
8888
IncludeSpecsMiddle
8989
IncludeSpecsTop
9090
IncludesMath
91-
InvalidTostrTest
9291
JSON
9392
KSAutoloadA
9493
KSAutoloadB
@@ -177,6 +176,7 @@ StringRefinement
177176
StringScanner
178177
StringSubclass
179178
StructClasses
179+
Syck
180180
Syslog
181181
TCPServer
182182
TCPSocket
@@ -205,7 +205,6 @@ UserObject
205205
UserPreviouslyDefinedWithInitializedIvar
206206
UserRegexp
207207
UserString
208-
ValidTostrTest
209208
Vector
210209
WEBrick
211210
WIN32OLE

spec/ruby/.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,7 @@ Lint/UnreachableCode:
9696
Lint/UriRegexp:
9797
Exclude:
9898
- 'library/uri/regexp_spec.rb'
99+
100+
Lint/Debugger:
101+
Exclude:
102+
- 'core/binding/fixtures/irb.rb'

spec/ruby/.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ script:
66
- ../mspec/bin/mspec $MSPEC_OPTS
77
matrix:
88
include:
9-
- rvm: 2.5.3
9+
- rvm: 2.5.5
1010
env: MSPEC_OPTS="-R2 -ff"
1111
- rvm: 2.3.8
1212
- rvm: 2.4.5
1313
env: CHECK_LEAKS=true
14-
- rvm: 2.5.3
14+
- rvm: 2.5.5
1515
env: CHECK_LEAKS=true
16-
- rvm: 2.6.1
16+
- rvm: 2.6.2
1717
env: CHECK_LEAKS=true
1818
- env: RUBOCOP=true
1919
rvm: 2.4.5

spec/ruby/command_line/feature_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@
6363
end
6464

6565
end
66-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
a = 10
22

3-
binding.irb
3+
binding.irb

spec/ruby/core/binding/irb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
out[-3..-1].should == ["a ** 2", "100", "exit"]
1515
end
1616
end
17-
end
17+
end

spec/ruby/core/file/birthtime_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
end
5151
end
5252

53-
platform_is :linux, :openbsd do
53+
platform_is :openbsd do
5454
it "raises an NotImplementedError" do
5555
lambda { @file.birthtime }.should raise_error(NotImplementedError)
5656
end
5757
end
58+
59+
# TODO: depends on Linux kernel version
5860
end

spec/ruby/core/file/open_spec.rb

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,21 @@
165165
File.exist?(@file).should == true
166166
end
167167

168-
it "opens a file with a file descriptor d and a block" do
169-
@fh = File.open(@file)
170-
@fh.should be_kind_of(File)
168+
without_feature :mjit do # [ruby-core:90895] MJIT worker may leave fd open in a forked child. TODO: consider acquiring GVL from MJIT worker.
169+
it "opens a file with a file descriptor d and a block" do
170+
@fh = File.open(@file)
171+
@fh.should be_kind_of(File)
171172

172-
lambda {
173-
File.open(@fh.fileno) do |fh|
174-
@fd = fh.fileno
175-
@fh.close
176-
end
177-
}.should raise_error(Errno::EBADF)
178-
lambda { File.open(@fd) }.should raise_error(Errno::EBADF)
173+
lambda {
174+
File.open(@fh.fileno) do |fh|
175+
@fd = fh.fileno
176+
@fh.close
177+
end
178+
}.should raise_error(Errno::EBADF)
179+
lambda { File.open(@fd) }.should raise_error(Errno::EBADF)
179180

180-
File.exist?(@file).should == true
181+
File.exist?(@file).should == true
182+
end
181183
end
182184

183185
it "opens a file that no exists when use File::WRONLY mode" do

spec/ruby/core/float/to_s_spec.rb

Lines changed: 127 additions & 125 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)