about summary refs log tree commit homepage
path: root/lib/yahns/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/config.rb')
-rw-r--r--lib/yahns/config.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/yahns/config.rb b/lib/yahns/config.rb
index 873722d..a46868b 100644
--- a/lib/yahns/config.rb
+++ b/lib/yahns/config.rb
@@ -103,13 +103,8 @@ class Yahns::Config # :nodoc:
   end
 
   def _add_hook(var, my_proc)
-    case my_proc
-    when Proc
-      my_proc.arity == 0 or raise ArgumentError,
-                         "#{var}=#{my_proc.inspect} should not take arguments"
-    else
+    Proc === my_proc or
       raise ArgumentError, "invalid type: #{var}=#{my_proc.inspect}"
-    end
 
     # this sets:
     # :atfork_prepare, :atfork_parent, :atfork_child