RSMangler icon indicating copy to clipboard operation
RSMangler copied to clipboard

Getting head of a mangle result in exception

Open Mister-X- opened this issue 6 years ago • 0 comments

Running something like rsmangler.rb --file wordlist.txt | head on a simple 2 word file will work as expected and output first 10 lines but it will throw an exception at Line 174:

cat
dog
catdog
dogcat
cd
catcat
tac
Cat
CAT
cated
Traceback (most recent call last):
	6: from ./rsmangler.rb:360:in `<main>'
	5: from ./rsmangler.rb:360:in `each'
	4: from ./rsmangler.rb:428:in `block in <main>'
	3: from ./rsmangler.rb:428:in `each'
	2: from ./rsmangler.rb:429:in `block (2 levels) in <main>'
	1: from ./rsmangler.rb:174:in `puts_if_allowed'
./rsmangler.rb:174:in `flush': Broken pipe (Errno::EPIPE)

It doesn't happen with less or without piping. Commenting out that line solves the issue but there may be other side effects

Mister-X- avatar Aug 23 '18 20:08 Mister-X-