Ruby 2.0.0 implements LoadError#path, but newly raised load errors will
not contain the path information. Replace the error message, copy
blame, and rereaise the same exception object
This is an obsolete method from the very early days,
apparently it was used circa 2004 because STI support
was not smart enough. This method is not public
interface, and we are heading a major version, so
removal seems right.
To facilitate the use of ActiveSupport::Testing::Performance outside
of a Rails application conditionally check for the presence of
Rails::VERSION::STRING before including it in the environment string.
Changes:
* Add `instance_accessor` option to opt out of the instance writer and
instance reader methods.
* Raises a NameError if the name of the attribute is not valid.
* Update documentation and tests.
* Add CHANGELOG entry in activesupport.
Some of these requires are now only necessary in
ActiveSupport::NumberHelper. Add hash/keys require due to symbolize_keys
usage in number helpers. Also remove some whitespaces.
Closes#6414
Neither Test::Unit nor MiniTest rescue exceptions like Interrupt or
NoMemoryError, but ActiveSupport::Testing::SetupAndTeardown#run which
overrides MiniTest::Unit::TestCase#run rescues them.
Rescuing an Interrupt exception is annoying, because it means when you
are running a lot of tests e.g. when running one of the rake test tasks,
you cannot break out using ctrl-C.
Rescuing exceptions like NoMemoryError is foolish, because the most
sensible thing to happen is for the process to terminate as soon as
possible.
This solution probably needs some finessing e.g. I'm not clear whether
the assumption is that only MiniTest is supported. Also early versions
of MiniTest did not have this behaviour. However, hopefully it's a
start.
Integrating with Test::Unit & MiniTest has always been a pain. It would
be great if both of them provided sensible extension points for the kind
of things that both Rails and Mocha want to do.
Use ActiveSupport::Multibyte::Chars.new instead of String#mb_chars.
It allows to use ActiveSupport::Multibyte::Chars without requiring
String multibyte core extension.