mirror of
https://github.com/github/rails.git
synced 2026-01-31 01:08:19 -05:00
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
20 lines
558 B
Ruby
20 lines
558 B
Ruby
# Ruby 1.9 introduces BasicObject which differs slighly from Builder's BlankSlate
|
|
# that had been used so far ActiveSupport::BasicObject provides a barebones object with
|
|
# the same method on both versions.
|
|
module ActiveSupport
|
|
if RUBY_VERSION >= '1.9'
|
|
class BasicObject < ::BasicObject
|
|
undef_method :==
|
|
undef_method :equal?
|
|
|
|
# Let ActiveSupport::BasicObject at least raise exceptions.
|
|
def raise(*args)
|
|
::Object.send(:raise, *args)
|
|
end
|
|
end
|
|
else
|
|
require 'blankslate'
|
|
BasicObject = BlankSlate
|
|
end
|
|
end
|