diff options
author | Xavier Noria <fxn@hashref.com> | 2010-07-31 11:55:24 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2010-07-31 11:55:24 +0200 |
commit | 3d7099891f07395ed889e7da9e13b3ff9244d539 (patch) | |
tree | 6a988362ec4a6b58c90a12e6b715cd6926a111ce /activesupport/lib | |
parent | 0e20e3ebc20250174867f33e0ad3972f7e7c76d0 (diff) | |
parent | d3819daaac0d2f730f2b34af31700c914e697375 (diff) | |
download | rails-3d7099891f07395ed889e7da9e13b3ff9244d539.tar.gz rails-3d7099891f07395ed889e7da9e13b3ff9244d539.tar.bz2 rails-3d7099891f07395ed889e7da9e13b3ff9244d539.zip |
Merge remote branch 'rails/master'
Diffstat (limited to 'activesupport/lib')
4 files changed, 15 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 8e90de110a..30195bdea5 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -138,7 +138,7 @@ module ActiveSupport cattr_accessor :logger, :instance_writer => true - attr_reader :silence + attr_reader :silence, :options alias :silence? :silence # Create a new cache. The options will be passed to any write method calls except @@ -147,11 +147,6 @@ module ActiveSupport @options = options ? options.dup : {} end - # Get the default options set when the cache was created. - def options - @options ||= {} - end - # Silence the logger. def silence! @silence = true diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index f33e4959f9..32913a06ad 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,4 +1,5 @@ require 'active_support/inflector/methods' +require 'active_support/inflector/inflections' # String inflections define new methods on the String class to transform names for different purposes. # For instance, you can figure out the name of a database from the name of a class. # diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb index eb61a7fc22..e03a744257 100644 --- a/activesupport/lib/active_support/xml_mini/nokogiri.rb +++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb @@ -1,4 +1,9 @@ -require 'nokogiri' +begin + require 'nokogiri' +rescue LoadError => e + $stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" + raise e +end require 'active_support/core_ext/object/blank' # = XmlMini Nokogiri implementation diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index 8af7b5e565..38c8685390 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -1,4 +1,9 @@ -require 'nokogiri' +begin + require 'nokogiri' +rescue LoadError => e + $stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" + raise e +end require 'active_support/core_ext/object/blank' # = XmlMini Nokogiri implementation using a SAX-based parser @@ -80,4 +85,4 @@ module ActiveSupport end end end -end
\ No newline at end of file +end |