Ticket #1600: hidden-whiny-nil.patch
| File hidden-whiny-nil.patch, 2.5 kB (added by Ulysses, 3 years ago) |
|---|
-
activesupport/lib/active_support/whiny_nil.rb
old new 19 19 end 20 20 21 21 def id 22 raise "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id"22 raise RuntimeError, "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id", caller 23 23 end 24 24 25 25 private 26 26 def method_missing(method, *args, &block) 27 27 if @@method_class_map.include?(method) 28 raise_nil_warning_for @@method_class_map[method] 28 raise_nil_warning_for @@method_class_map[method], caller 29 29 else 30 30 super 31 31 end 32 32 end 33 33 34 def raise_nil_warning_for(klass )35 raise NoMethodError, NIL_WARNING_MESSAGE % klass 34 def raise_nil_warning_for(klass, with_caller = nil) 35 raise NoMethodError, NIL_WARNING_MESSAGE % klass, with_caller || caller 36 36 end 37 37 38 38 NIL_WARNING_MESSAGE = <<-end_message unless const_defined?(:NIL_WARNING_MESSAGE) -
railties/html/500.html
old new 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"2 "http://www.w3.org/TR/html4/loose.dtd">3 1 <html> 4 2 <body> 5 3 <h1>Application error (Apache)</h1> -
railties/html/404.html
old new 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"2 "http://www.w3.org/TR/html4/loose.dtd">3 1 <html> 4 2 <body> 5 3 <h1>File not found</h1> -
railties/html/index.html
old new 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"2 "http://www.w3.org/TR/html4/loose.dtd">3 1 <html> 4 2 <head> 5 3 <title>Rails: Welcome on board</title>