misc/hexdump.rb in metasm-1.0.1 vs misc/hexdump.rb in metasm-1.0.2

- old
+ new

@@ -49,7 +49,8 @@ fmt << 'c' if ARGV.delete '-C' fmt << 'w' if ARGV.delete '-W' fmt << 'd' if ARGV.delete '-D' fmt << 'a' if ARGV.delete '-A' fmt = ['c', 'd', 'a'] if ARGV.delete '-a' - File.open(ARGV.first, 'rb').hexdump(:fmt => fmt) + infd = ARGV.empty? ? $stdin : File.open(ARGV.first, 'rb') + infd.hexdump(:fmt => fmt) end