lib/digest/sha1.rb in rubysl-digest-1.0.1 vs lib/digest/sha1.rb in rubysl-digest-1.1.0
- old
+ new
@@ -5,16 +5,13 @@
require 'digest/sha1/sha1'
class SHA1 < Digest::SHA1
class << self
- alias orig_new new
def new(str = nil)
- if str
- orig_new.update(str)
- else
- orig_new
- end
+ sha1 = super()
+ sha1.update(str) if str
+ sha1
end
def sha1(*args)
new(*args)
end