1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport
Kir Shatrov 4b3cd4b0fe Fix arguments passing in testing isolation
The issue affects MRI 2.2.5, MRI 2.3.3, JRuby 9.1.6.0. It can be reproduced by:

```
$ cd activemodel
$ NO_FORK=1 bundle exec rake test
```

If we wrap original arguments in quotes, it will be considered as a one big single argument.
Later, [`rake/rake_test_loader.rb`](https://github.com/ruby/rake/blob/7863b97/lib/rake/rake_test_loader.rb#L15)
will iterate over ARGS and try to require that huge single "argument" (which is a list of multiple .rb files).
This leads to an exception:

```
/Users/kir/Project
s/opensource/rails/vendor/bundle/gems/rake-11.3.0/lib/rake/rake_test_loader.rb:15:in `require': cannot load such file -- /Users/kir/Projects/opensource/rails/activemodel/test/cases/
attribute_assignment_test.rb [stripped] /Users/kir/Projects/opensource/rails/activemodel/test/cases/validations/with_validation_test.rb /Users/kir/Projects/opensource/rails/activemodel/test/cases/validations_test
.rb (LoadError)

        from /Users/kir/Projects/opensource/rails/vendor/bundle/gems/rake-11.3.0/lib/rake/rake_test_loader.rb:15:in `block in <main>'
        from /Users/kir/Projects/opensource/rails/vendor/bundle/gems/rake-11.3.0/lib/rake/rake_test_loader.rb:4:in `select'
        from /Users/kir/Projects/opensource/rails/vendor/bundle/gems/rake-11.3.0/lib/rake/rake_test_loader.rb:4:in `<main>'
```

Originally quotes were introduced in https://github.com/rails/rails/pull/19819 to fix MRI 2.2.2.

The fix solves issue on all affected platforms: MRI 2.2.5, MRI 2.3.3, JRuby 9.1.6.0.
2016-11-30 14:02:02 -05:00
..
bin Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
lib Fix arguments passing in testing isolation 2016-11-30 14:02:02 -05:00
test ✂️ needless lines beneath private. 2016-11-20 17:58:36 +01:00
activesupport.gemspec applies new string literal convention in the gemspecs 2016-08-06 19:27:12 +02:00
CHANGELOG.md remove duplicated changelog entry [ci skip] 2016-11-15 07:43:21 +09:00
MIT-LICENSE Update copyright notices to 2016 [ci skip] 2015-12-31 18:27:19 +02:00
Rakefile fixes remaining RuboCop issues [Vipul A M, Xavier Noria] 2016-09-01 23:41:49 +02:00
README.rdoc [ci skip] Add a dollar sign to each command in the READMEs 2015-12-06 19:18:52 +01:00

= Active Support -- Utility classes and Ruby extensions from Rails

Active Support is a collection of utility classes and standard library
extensions that were found useful for the Rails framework. These additions
reside in this package so they can be loaded as needed in Ruby projects
outside of Rails.


== Download and installation

The latest version of Active Support can be installed with RubyGems:

  $ gem install activesupport

Source code can be downloaded as part of the Rails project on GitHub:

* https://github.com/rails/rails/tree/master/activesupport


== License

Active Support is released under the MIT license:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at:

* http://api.rubyonrails.org

Bug reports can be filed for the Ruby on Rails project here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core