diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-07 15:31:08 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-07 15:31:08 -0200 |
commit | bdeeca84e34d3e0863a6fd03defb9c95fd0241d9 (patch) | |
tree | 0a38235255603db4dcd9180b796acf77584cb46f /activesupport | |
parent | 70693f08d04292c06e26720e682fc0e1b456935f (diff) | |
parent | ebe73abea0ae02094ddc28f8fd60ae92373b6113 (diff) | |
download | rails-bdeeca84e34d3e0863a6fd03defb9c95fd0241d9.tar.gz rails-bdeeca84e34d3e0863a6fd03defb9c95fd0241d9.tar.bz2 rails-bdeeca84e34d3e0863a6fd03defb9c95fd0241d9.zip |
Merge pull request #18842 from yuki24/simplify-NameError#missing_name
NameError#missing_name? can just use NameError#name if the arg is a Symbol
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/name_error.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/name_error.rb b/activesupport/lib/active_support/core_ext/name_error.rb index b82148e4e5..6b447d772b 100644 --- a/activesupport/lib/active_support/core_ext/name_error.rb +++ b/activesupport/lib/active_support/core_ext/name_error.rb @@ -23,8 +23,7 @@ class NameError # # => true def missing_name?(name) if name.is_a? Symbol - last_name = (missing_name || '').split('::').last - last_name == name.to_s + self.name == name else missing_name == name.to_s end |