Created
September 23, 2011 00:31
-
-
Save takaokouji/1236457 to your computer and use it in GitHub Desktop.
A patch fixes #1391 "macruby interpreter quits on 'quit' out of scope" - http://www.macruby.org/trac/ticket/1391
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes in HEAD | |
Modified lib/irb/context.rb | |
diff --git a/lib/irb/context.rb b/lib/irb/context.rb | |
index 0b03d00..a7e11fc 100644 | |
--- a/lib/irb/context.rb | |
+++ b/lib/irb/context.rb | |
@@ -124,3 +124,7 @@ module IRB | |
end | |
end | |
end | |
+ | |
+def self.quit | |
+ exit | |
+end | |
Modified lib/irb/source.rb | |
diff --git a/lib/irb/source.rb b/lib/irb/source.rb | |
index 03f7104..6324d15 100644 | |
--- a/lib/irb/source.rb | |
+++ b/lib/irb/source.rb | |
@@ -170,14 +170,6 @@ module IRB | |
super | |
end | |
- def on_ident(token) #:nodoc: | |
- if @level == 0 && TERMINATE_KEYWORDS.include?(token) | |
- @terminate = true | |
- else | |
- super | |
- end | |
- end | |
- | |
def on_lbrace(token) #:nodoc: | |
@level += 1 | |
super | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a quick patch. I think @alloy knows better fixing. However, this works.