lib/minitar.rb in minitar-1.0.0 vs lib/minitar.rb in minitar-1.0.1
- old
+ new
@@ -29,20 +29,20 @@
# Minitar::Output, as Minitar::Output#close automatically closes both the
# Output object and the wrapped data stream object.
#
# begin
# sgz = Zlib::GzipWriter.new(StringIO.new(""))
-# tar = Output.new(sgz)
+# tar = Minitar::Output.new(sgz)
# Find.find('tests') do |entry|
# Minitar.pack_file(entry, tar)
# end
# ensure
# # Closes both tar and sgz.
# tar.close
# end
class Minitar
- VERSION = "1.0.0".freeze # :nodoc:
+ VERSION = "1.0.1".freeze # :nodoc:
# The base class for any minitar error.
Error = Class.new(::StandardError)
# Raised when a wrapped data stream class is not seekable.
NonSeekableStream = Class.new(Error)
@@ -73,24 +73,14 @@
# (mode +r+) and Minitar::Output.open (mode +w+). No other
# modes are currently supported.
def open(dest, mode = "r", &)
case mode
when "r"
- Input.open(dest, &)
+ Minitar::Input.open(dest, &)
when "w"
- Output.open(dest, &block)
+ Minitar::Output.open(dest, &block)
else
raise "Unknown open mode for Minitar.open."
- end
- end
-
- def const_missing(c) # :nodoc:
- case c
- when :BlockRequired
- warn "This constant has been removed."
- const_set(:BlockRequired, Class.new(StandardError))
- else
- super
end
end
def windows? # :nodoc:
RbConfig::CONFIG["host_os"] =~ /^(mswin|mingw|cygwin)/