nonsequitur/inf-ruby — pull request #21 by kalifg (2013-05-10 15:16:52+00:00)
Title: Added code to deal with sending large regions to the inferior process.

There is a long standing problem in emacs with sending large strings via comint.
See (http://stackoverflow.com/questions/5541622/comint-mode-inserts-line-break-every-4096-characters)
for some reference. This can cause a problem if for instance you have a
variable value being initialied to a large string. You will receive an error
like :

> irb(main):122:0>
> SyntaxError: /home/mdwyer/Desktop/CarTalk/download.rb:6: unterminated string meets end of file
>	from (irb):122:in \`eval'
>	from (irb):122
>	from /usr/bin/irb:12:in \`

'

This patch adds code to `ruby-send-region` that pages the input to be sent every
`comint-max-input-size` characters. Each page is terminated with a newline
which works around the comint bug. The newline is swallowed by comint, so no
extraneous newlines are sent to the inferior process.