diff options
author | Xavier Noria <fxn@hashref.com> | 2009-11-09 21:11:26 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-11-09 22:16:51 +0100 |
commit | 1979e9c8553f4d7905822fdcc99e52d179e78c3c (patch) | |
tree | c0b82d5b85bec43c14fc215aa8082e020df35dae /activesupport/lib | |
parent | d4513ac69958063de3cad9aa655fe9d63e82ec76 (diff) | |
download | rails-1979e9c8553f4d7905822fdcc99e52d179e78c3c.tar.gz rails-1979e9c8553f4d7905822fdcc99e52d179e78c3c.tar.bz2 rails-1979e9c8553f4d7905822fdcc99e52d179e78c3c.zip |
Symbol#to_proc is not needed for Ruby >= 1.8.7
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/symbol.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/symbol/to_proc.rb | 14 | ||||
-rw-r--r-- | activesupport/lib/active_support/ruby/shim.rb | 2 |
3 files changed, 0 insertions, 17 deletions
diff --git a/activesupport/lib/active_support/core_ext/symbol.rb b/activesupport/lib/active_support/core_ext/symbol.rb deleted file mode 100644 index c103cd9dcf..0000000000 --- a/activesupport/lib/active_support/core_ext/symbol.rb +++ /dev/null @@ -1 +0,0 @@ -require 'active_support/core_ext/symbol/to_proc' diff --git a/activesupport/lib/active_support/core_ext/symbol/to_proc.rb b/activesupport/lib/active_support/core_ext/symbol/to_proc.rb deleted file mode 100644 index 520369452b..0000000000 --- a/activesupport/lib/active_support/core_ext/symbol/to_proc.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Symbol - # Turns the symbol into a simple proc, which is especially useful for enumerations. Examples: - # - # # The same as people.collect { |p| p.name } - # people.collect(&:name) - # - # # The same as people.select { |p| p.manager? }.collect { |p| p.salary } - # people.select(&:manager?).collect(&:salary) - # - # This is a builtin method in Ruby 1.8.7 and later. - def to_proc - Proc.new { |*args| args.shift.__send__(self, *args) } - end unless :to_proc.respond_to?(:to_proc) -end diff --git a/activesupport/lib/active_support/ruby/shim.rb b/activesupport/lib/active_support/ruby/shim.rb index 37c57c485a..43e7ffc938 100644 --- a/activesupport/lib/active_support/ruby/shim.rb +++ b/activesupport/lib/active_support/ruby/shim.rb @@ -9,7 +9,6 @@ # Process Process.daemon # REXML security fix # String ord -# Symbol to_proc # Time to_date, to_time, to_datetime require 'active_support' require 'active_support/core_ext/date/calculations' @@ -20,5 +19,4 @@ require 'active_support/core_ext/object/tap' require 'active_support/core_ext/process/daemon' require 'active_support/core_ext/string/conversions' require 'active_support/core_ext/rexml' -require 'active_support/core_ext/symbol/to_proc' require 'active_support/core_ext/time/conversions' |