lib/ronin/formatting/extensions/text/string.rb in ronin-0.1.3 vs lib/ronin/formatting/extensions/text/string.rb in ronin-0.1.4
- old
+ new
@@ -36,19 +36,19 @@
#
def format_chars(options={},&block)
included = (options[:included] || Ronin::Chars.all)
excluded = (options[:excluded] || [])
- formatted = included - excluded
+ targeted = included - excluded
formatted = ''
self.each_byte do |b|
c = b.chr
- if formatted.include?(c)
- formatted_chars << block.call(c)
+ if targeted.include_byte?(b)
+ formatted << block.call(c)
else
- formatted_chars << c
+ formatted << c
end
end
return formatted
end