lib/abstractivator/proc_ext.rb in abstractivator-0.8.0 vs lib/abstractivator/proc_ext.rb in abstractivator-0.10.0
- old
+ new
@@ -95,9 +95,18 @@
x.call(*args, **kws, &block)
else
x.call(*args, &block)
end
end
+
+ def self.loosen_varargs!(args)
+ if args.size == 1 && args.first.is_a?(Array)
+ real_args = args.first
+ args.clear
+ args.concat(real_args)
+ nil
+ end
+ end
end
class Method
include MethodAndProcExtensions
end