Skip to content

Commit e5a6353

Browse files
committed
Invert if Ruby 1.9 to unless Ruby 1.8, for ruby-head.
1 parent f1298bc commit e5a6353

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Gemfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ GEM
3131
i18n (0.6.0)
3232
multi_json (1.0.4)
3333
mysql (2.8.1)
34-
rake (0.8.7)
35-
rake-compiler (0.7.9)
34+
rake (0.9.4)
35+
rake-compiler (0.8.1)
3636
rake
3737
rspec (2.8.0)
3838
rspec-core (~> 2.8.0)
@@ -55,7 +55,7 @@ DEPENDENCIES
5555
faker
5656
mysql
5757
mysql2!
58-
rake (= 0.8.7)
59-
rake-compiler (~> 0.7.7)
60-
rspec
58+
rake (~> 0.9.3)
59+
rake-compiler (~> 0.8.1)
60+
rspec (~> 2.8.0)
6161
sequel

spec/mysql2/client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ def connect *args
421421
}.should_not raise_error(SystemStackError)
422422
end
423423

424-
if RUBY_VERSION =~ /1.9/
424+
unless RUBY_VERSION =~ /1.8/
425425
it "should carry over the original string's encoding" do
426426
str = "abc'def\"ghi\0jkl%mno"
427427
escaped = Mysql2::Client.escape(str)
@@ -638,7 +638,7 @@ def connect *args
638638
@client.ping.should eql(false)
639639
end
640640

641-
if RUBY_VERSION =~ /1.9/
641+
unless RUBY_VERSION =~ /1.8/
642642
it "should respond to #encoding" do
643643
@client.should respond_to(:encoding)
644644
end

spec/mysql2/error_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
@error.should respond_to(:error)
3636
end
3737

38-
if RUBY_VERSION =~ /1.9/
38+
unless RUBY_VERSION =~ /1.8/
3939
it "#message encoding should match the connection's encoding, or Encoding.default_internal if set" do
4040
if Encoding.default_internal.nil?
4141
@error.message.encoding.should eql(@client.encoding)

spec/mysql2/result_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
end
235235

236236
if 1.size == 4 # 32bit
237-
if RUBY_VERSION =~ /1.9/
237+
unless RUBY_VERSION =~ /1.8/
238238
klass = Time
239239
else
240240
klass = DateTime
@@ -252,7 +252,7 @@
252252
r.first['test'].class.should eql(klass)
253253
end
254254
elsif 1.size == 8 # 64bit
255-
if RUBY_VERSION =~ /1.9/
255+
unless RUBY_VERSION =~ /1.8/
256256
it "should return Time when timestamp is < 1901-12-13 20:45:52" do
257257
r = @client.query("SELECT CAST('1901-12-13 20:45:51' AS DATETIME) as test")
258258
r.first['test'].class.should eql(Time)

0 commit comments

Comments
 (0)