lib/sub_diff/sub.rb in sub_diff-1.0.7 vs lib/sub_diff/sub.rb in sub_diff-1.1.0
- old
+ new
@@ -4,15 +4,12 @@
def initialize(differ)
@differ = differ
end
- def diff(*args, &block)
- # Ruby 1.8.7 does not support additional args after * (splat)
- args.push(block)
-
- differ.each_diff(*args) do |builder, diff|
- process(builder, diff, args.first)
+ def diff(search, *args, &block)
+ differ.each_diff(search, *args, block) do |builder, diff|
+ process(builder, diff, search)
end
end
private