* Do not loop forever when skip_lines regexp matches zero length with anchors
* Remove needless white spaces
* Add missing eos check in skip_needless_lines
* Simplify test
https://github.com/ruby/csv/commit/3b15d4a3e8
* Make CSV::Row#dup return a usable Row
Previously, calling `dup` on a `CSV::Row` object yielded an object whose
copy was too shallow. Changing the clone's fields would also change the
fields on the source. This change makes the clone more distinct from the
source, so that changes can be made to its fields without affecting the
source.
* Simplify
https://github.com/ruby/csv/commit/64a1ea06fc
Popular Ruby libraries such as Rails and Rubocop relying on the
previous behavior, even though it is technically a bug. The
correct behavior is probably raising RangeError, since that is what
an endless range raises.
Related to [Bug #17017]
The HTTP test hits a remote website which isn't always available and is
not self-contained. Ideally we will rewrite this test with an internal
web server.
The newly added specs needs to be tagged as
:readline, otherwise they fail on Windows with
the backtrace: `ZeroDivisionError: divided by 0`.
Such issues are already being skipped on Windows.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/391f860af4
Since this PR was made because we missed checking
RuboCop offenses with different flags, therefore
adding tests so that all flag combinations are
tested.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/d08250efc2
The Gemfile wasn't properly put in the last commit.
As a result, Layout/EmptyLines inspected an offense
in the Gemfile.
This also fixes the spec w.r.t change in the task
default.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/d1418fddd3
If the blank lines aren't used, then rubocop tries to
sort them in alphabetical order within their section.
Thus, adding lines so rubocop considers them as
different sections and doesn't try to sort them.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/cf44b18f0f
In case of multiple Rake tasks, the default tasks would
look something like this:
`task default: [:spec, :rubocop]`
Instead, they should use %i and look something like this:
`task default: %i[spec rubocop]`
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/487ecd59ce
With #3731 and #3740 merged, this covers up the
remaining part of the issues.
This was discovered when one tries to create a gem
with a different framework.
Could be reproduced with:
`bundle gem foo --ext --test=test-unit`
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/51b6457150
Right now, we're not specifying the version constraints
on RuboCop that is shipped when a new gem is created.
This can break specs which runs rubocop on a new
skeleton gem as the newer versions of RuboCop are
released.
This commit ensures that the specs don't break by
constraining the RuboCop version.
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
https://github.com/rubygems/rubygems/commit/0b47243edd
It simplifies things and should avoid issues like the one we had where
the master branch had a bad `.gitattributes` file and changing it on a
PR would be disregarded.
In order for this to work, we need to make sure to fetch all tags from
the repository, so that they can properly be checked out later. This
does not apply to the case of testing against `RGV=..`, since no extra
cloning is needed there.
https://github.com/rubygems/rubygems/commit/d088d936b8