Permalink
Browse files

Merge pull request #4075 from arunagw/activeresource_dead_code_removal

Removal dead code from my side :-)
  • Loading branch information...
2 parents cc19290 + c01124e commit b31c2ed367e7ee4779d9b292b4b45e7b7daec27d @josevalim josevalim committed Dec 20, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 activeresource/lib/active_resource/base.rb
@@ -1413,7 +1413,7 @@ def find_or_create_resource_in_modules(resource_name, module_names)
namespaces = module_names[0, module_names.size-1].map do |module_name|
receiver = receiver.const_get(module_name)
end
- const_args = RUBY_VERSION < "1.9" ? [resource_name] : [resource_name, false]
+ const_args = [resource_name, false]
if namespace = namespaces.reverse.detect { |ns| ns.const_defined?(*const_args) }
namespace.const_get(*const_args)
else
@@ -1425,7 +1425,7 @@ def find_or_create_resource_in_modules(resource_name, module_names)
def find_or_create_resource_for(name)
resource_name = name.to_s.camelize
- const_args = RUBY_VERSION < "1.9" ? [resource_name] : [resource_name, false]
+ const_args = [resource_name, false]
if self.class.const_defined?(*const_args)
self.class.const_get(*const_args)
else

0 comments on commit b31c2ed

Please sign in to comment.