Skip to content

Fix for Ruby 2.5 warnings in tests #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/test_rdoc_encoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,11 @@ def test_class_set_encoding
assert_equal Encoding::UTF_8, s.encoding

s = "<?xml version='1.0' encoding='UTF-8'?>\n"
expected = s.encoding
RDoc::Encoding.set_encoding s

assert_equal Encoding::UTF_8, s.encoding

s = "<?xml version='1.0' encoding=\"UTF-8\"?>\n"
expected = s.encoding
RDoc::Encoding.set_encoding s

assert_equal Encoding::UTF_8, s.encoding
Expand Down
3 changes: 3 additions & 0 deletions test/test_rdoc_parser_c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ def test_do_methods_in_c
klass = util_get_class content, 'cDate'
end

assert_equal 'Date', klass.full_name
assert_match ' blah.c ', err
end

Expand All @@ -664,6 +665,7 @@ def test_do_methods_in_cpp
klass = util_get_class content, 'cDate'
end

assert_equal 'Date', klass.full_name
assert_match ' blah.cpp ', err
end

Expand All @@ -686,6 +688,7 @@ def test_do_methods_in_y
klass = util_get_class content, 'cDate'
end

assert_equal 'Date', klass.full_name
assert_match ' blah.y ', err
end

Expand Down
6 changes: 3 additions & 3 deletions test/test_rdoc_require.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ def setup
def test_initialize
assert_equal 'foo', @req.name

req = RDoc::Require.new '"foo"', ''
RDoc::Require.new '"foo"', ''
assert_equal 'foo', @req.name

req = RDoc::Require.new '\'foo\'', ''
RDoc::Require.new '\'foo\'', ''
assert_equal 'foo', @req.name

req = RDoc::Require.new '|foo|', ''
RDoc::Require.new '|foo|', ''
assert_equal 'foo', @req.name, 'for fortran?'
end

Expand Down