Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the inherit argument optional for const_defined?, since 1.8 does…

… not support it.
  • Loading branch information...
commit 868f2a391bb414f947ed3c2b9ff4a39985d5b1d3 1 parent 7ba9911
@postmodern authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/open_namespace/class_methods.rb
View
6 lib/open_namespace/class_methods.rb
@@ -91,15 +91,15 @@ def require_file(name)
# @return [Boolean]
# Specifies whether the constant is defined.
#
- def const_defined?(name,inherit=true)
- if super(name,inherit)
+ def const_defined?(name,*inherit)
+ if super(name,*inherit)
true
else
# attempt to load the file that might have the constant
require_file(OpenNamespace.const_path(name))
# check for the constant again
- return super(name,inherit)
+ return super(name,*inherit)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.