1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* remove trailing spaces, append newline at EOF.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2017-05-07 12:05:36 +00:00
parent 95e8c48dd3
commit 6bc742bc6d
30 changed files with 37 additions and 31 deletions

View file

@ -17,4 +17,4 @@ class Object
def be_false
BeFalseMatcher.new
end
end
end

View file

@ -17,4 +17,4 @@ class Object
def be_nil
BeNilMatcher.new
end
end
end

View file

@ -17,4 +17,4 @@ class Object
def be_true
BeTrueMatcher.new
end
end
end

View file

@ -75,4 +75,4 @@ class Object
def equal_element(*args)
EqualElementMatcher.new(*args)
end
end
end

View file

@ -9,4 +9,4 @@ class Object
def have_class_variable(variable)
HaveClassVariableMatcher.new(variable)
end
end
end

View file

@ -9,4 +9,4 @@ class Object
def have_instance_variable(variable)
HaveInstanceVariableMatcher.new(variable)
end
end
end

View file

@ -0,0 +1 @@

View file

@ -65,7 +65,7 @@ Finished in 2.0 seconds
1)
describe it ERROR
Exception: broken:
Exception: broken:
path/to/some/file.rb:35:in method
1 example, 0 failures

View file

@ -9,7 +9,7 @@ describe MSpec, "#deprecate" do
warning.should start_with(<<-EOS.chomp)
some_method is deprecated, use other_method instead.
from
from
EOS
warning.should include(__FILE__)
warning.should include('8')

View file

@ -1 +1 @@
f {
f {

View file

@ -8,4 +8,4 @@ describe "Complex#negative?" do
c.negative?
}.should raise_error(NoMethodError)
end
end
end

View file

@ -8,4 +8,4 @@ describe "Complex#positive?" do
c.positive?
}.should raise_error(NoMethodError)
end
end
end

View file

@ -68,7 +68,7 @@ with_feature :encoding do
str = ""
str.force_encoding("ascii-8bit")
encoded = str.encode("utf-8", "utf-8")
encoded.should_not equal(str)
encoded.encoding.should == Encoding::UTF_8
end

View file

@ -477,7 +477,7 @@ module Super
end
end
end
module KeywordArguments
class A
def foo(**args)

View file

@ -232,7 +232,7 @@ describe "The rescue keyword" do
end
end.should raise_error(Exception)
end
it "uses === to compare against rescued classes" do
rescuer = Class.new
@ -245,12 +245,12 @@ describe "The rescue keyword" do
rescue rescuer
rescued = :success
rescue Exception
rescued = :failure
rescued = :failure
end
rescued.should == :success
end
it "only accepts Module or Class in rescue clauses" do
rescuer = 42
lambda {

View file

@ -246,7 +246,7 @@ describe "The super keyword" do
it "without explicit arguments that are '_' including any modifications" do
Super::ZSuperWithUnderscores::B.new.m_modified(1, 2).should == [14, 2]
end
describe 'when using keyword arguments' do
it 'passes any given keyword arguments to the parent' do
b = Super::KeywordArguments::B.new

View file

@ -29,7 +29,7 @@ describe "The undef keyword" do
it "raises a NameError when passed a missing name" do
Class.new do
lambda {
undef not_exist
undef not_exist
}.should raise_error(NameError) { |e|
# a NameError and not a NoMethodError
e.class.should == NameError

View file

@ -10,7 +10,7 @@ describe "Base64#urlsafe_decode64" do
it "uses '-' instead of '+'" do
decoded = Base64.urlsafe_decode64('IkJlaW5nIGRpc2ludGVncmF0ZWQgbWFrZXMgbWUgdmUtcnkgYW4tZ3J5ISIgPGh1ZmYsIGh1ZmY-')
decoded.should == '"Being disintegrated makes me ve-ry an-gry!" <huff, huff>'
decoded.should == '"Being disintegrated makes me ve-ry an-gry!" <huff, huff>'
end
ruby_version_is ""..."2.3" do

View file

@ -1,3 +1,3 @@
This is an example file
which is going to be transmitted
using #putbinaryfile.
using #putbinaryfile.

View file

@ -1,3 +1,3 @@
This is an example file
which is going to be transmitted
using #puttextfile.
using #puttextfile.

View file

@ -45,4 +45,4 @@ describe "TCPSocket#setsockopt" do
end
end
end
end
end

View file

@ -21,7 +21,7 @@ describe "Thread::SizedQueue#max=" do
@sized_queue.max = 10
@sized_queue.max.should == 10
end
it "does not remove items already in the queue beyond the maximum" do
@sized_queue.enq 1
@sized_queue.enq 2

View file

@ -154,7 +154,7 @@ VALUE sws_typed_change_struct(VALUE self, VALUE obj, VALUE new_val) {
void Init_typed_data_spec(void) {
VALUE cls;
cls = rb_define_class("CApiAllocTypedSpecs", rb_cObject);
#if defined(HAVE_RTYPEDDATA) && defined(HAVE_TYPEDDATA_WRAP_STRUCT)
rb_define_alloc_func(cls, sdaf_alloc_typed_func);
rb_define_method(cls, "typed_wrapped_data", sdaf_typed_get_struct, 0);

View file

@ -3,17 +3,17 @@ require File.expand_path('../../spec_helper', __FILE__)
require 'json'
describe "String#to_f" do
it "resists CVE-2013-4164 by converting very long Strings to a Float" do
"1.#{'1'*1000000}".to_f.should be_close(1.1111111111111112, TOLERANCE)
end
end
describe "JSON.parse" do
it "resists CVE-2013-4164 by converting very long Strings to a Float" do
JSON.parse("[1.#{'1'*1000000}]").first.should be_close(1.1111111111111112, TOLERANCE)
end
end

View file

@ -3,7 +3,7 @@ require File.expand_path('../../spec_helper', __FILE__)
require 'rexml/document'
describe "REXML::Document.new" do
it "resists CVE-2014-8080 by raising an exception when entity expansion has grown too large" do
xml = <<XML
<?xml version="1.0" encoding="UTF-8" ?>
@ -28,5 +28,5 @@ XML
e.message.should =~ /entity expansion has grown too large/
}
end
end