diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-05 13:25:33 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-05 13:25:33 -0700 |
commit | e7f1556d0e75c635212273cc5e3cfd113456ff29 (patch) | |
tree | 39e81a1fa01bacb18eb2c396d845ebcd815055b9 /activesupport/lib | |
parent | 53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (diff) | |
parent | df8154c845f8fb251c58f1fd882cc221cfdcbbc2 (diff) | |
download | rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.gz rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.tar.bz2 rails-e7f1556d0e75c635212273cc5e3cfd113456ff29.zip |
Merge branch 'master' into erbout
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/string_inquirer.rb | 11 | ||||
-rw-r--r-- | activesupport/lib/active_support/string_questioneer.rb | 9 |
3 files changed, 12 insertions, 10 deletions
diff --git a/activesupport/lib/active_support.rb b/activesupport/lib/active_support.rb index 2b418a1bb7..1a8603e892 100644 --- a/activesupport/lib/active_support.rb +++ b/activesupport/lib/active_support.rb @@ -43,7 +43,7 @@ require 'active_support/ordered_hash' require 'active_support/ordered_options' require 'active_support/option_merger' -require 'active_support/string_questioneer' +require 'active_support/string_inquirer' require 'active_support/values/time_zone' require 'active_support/duration' diff --git a/activesupport/lib/active_support/string_inquirer.rb b/activesupport/lib/active_support/string_inquirer.rb new file mode 100644 index 0000000000..65545748df --- /dev/null +++ b/activesupport/lib/active_support/string_inquirer.rb @@ -0,0 +1,11 @@ +module ActiveSupport + class StringInquirer < String + def method_missing(method_name, *arguments) + if method_name.to_s.ends_with?("?") + self == method_name.to_s[0..-2] + else + super + end + end + end +end diff --git a/activesupport/lib/active_support/string_questioneer.rb b/activesupport/lib/active_support/string_questioneer.rb deleted file mode 100644 index 7732f8b401..0000000000 --- a/activesupport/lib/active_support/string_questioneer.rb +++ /dev/null @@ -1,9 +0,0 @@ -class StringQuestioneer < String - def method_missing(method_name, *arguments) - if method_name.to_s.ends_with?("?") - self == method_name.to_s[0..-2] - else - super - end - end -end
\ No newline at end of file |