* fix oddball bug with newlines thanks to using Regexp to split chars
git-svn-id: file:///home/svn/incoming/trunk@3576 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ module Text
|
||||
# the regex the first time it is used and never check again. Since we
|
||||
# want to know how many to capture on every instance, we do it this
|
||||
# way.
|
||||
return str.gsub(Regexp.new(".{#{count}}")) { |s| prefix + s.unpack('H*')[0] }
|
||||
return str.unpack('H*')[0].gsub(Regexp.new(".{#{count * 2}}")) { |s| prefix + s }
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user