summaryrefslogtreecommitdiff
path: root/lib/irb.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-25 06:38:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-25 06:38:26 +0000
commit7514584b706134864eec1ee8c5732c458b4634ab (patch)
treea7978c03e3c6f42de4e2430a1a3105bb969f1976 /lib/irb.rb
parentb80df38ae003fe5ea5636a4252a81b2e4b0ca8a9 (diff)
* lib/rational.rb: applied documentation patch from Gavin Sinclair
<gsinclair@gmail.com>. [ruby-core:06364] * lib/irb.rb (IRB::Irb::eval_input): handle prompts with newlines in irb auto-indentation mode. [ruby-core:06358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb.rb')
-rw-r--r--lib/irb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 5cacbf859e..1fb4397e68 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -119,7 +119,7 @@ module IRB
end
if @context.auto_indent_mode
unless ltype
- ind = prompt(@context.prompt_i, ltype, indent, line_no).size +
+ ind = prompt(@context.prompt_i, ltype, indent, line_no)[/.*\z/].size +
indent * 2 - p.size
ind += 2 if continue
@context.io.prompt = p + " " * ind if ind > 0