* 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:
bmc
2006-03-29 18:40:15 +00:00
parent d631902fc1
commit ca5da765c5
+1 -1
View File
@@ -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
#