lib/rbkb/cli/unhexify.rb in emonti-rbkb-0.6.2.1 vs lib/rbkb/cli/unhexify.rb in emonti-rbkb-0.6.6
- old
+ new
@@ -38,16 +38,12 @@
# Default to standard input
@opts[:indat] ||= @stdin.read()
@opts[:indat].delete!("\r\n")
- @opts[:delim] ||= /\s*/
+ @opts[:delim] ||= Regexp.new('\s*')
- unless out = @opts[:indat].unhexify(@opts[:delim])
- bail "Error: Failed parsing as hex"
- end
-
- @stdout << out
+ @stdout << @opts[:indat].unhexify(@opts[:delim])
self.exit(0)
end
end