[Question]
  [
Ruby comes with a built-in REPL, which is quite handy.
![screenshot of IRB](https://i.stack.imgur.com/V7y6s.png)
Your challenge is to crash it in the least amount of code!
The definition of "crash" is "make it exit in an **unintended** way." This means `exit`, `quit`, `abort`, `irb_exit`, `irb_quit`, et. al. are not valid answers.
Furthermore, you may **not** cause any side-effect to any other part of the system. For example, ``rm -rf /`` is not valid either.
Any version 1.9.3 or above is valid. If your code only works on a specific version of Ruby, you may specify that in the answer.
The final restriction is that you may not rely on any gems.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code that crashes IRB will win!
  
[Answer]
# 16 characters
```
String=0
String=0
```
Not the shortest, but I think it's funny that it doesn't crash until the second line. Generates roughly 20 lines of text before IRB exits. For some reason it cannot be shortened to for instance `2.times{String=0}`.
---
**edit**
Of all the answers so far, this is the only one that has worked for me (and it works in all versions I could get my hands on), and I've tested all of them in these versions:
On whatever kind of Linux I get when `ssh`'ing into my university:
```
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]
ruby 1.8.5 (2006-08-25) [x86_64-linux]
```
Mac OS X Mavericks default:
```
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
```
Installed through Homebrew on OS X:
```
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]
```
---
**edit 2**
# 7 characters
Combining my first version (and/or @[Howard](https://codegolf.stackexchange.com/a/22345/4372)'s answer, for maximum cross reference) with @[chinese perl goth](https://codegolf.stackexchange.com/a/22353/4372)'s answer:
```
STDIN=0
```
[Answer]
# 12 chars
ruby is not exactly my cup of tea, but I've just found out that irb acts funny when I close the stdin :)
```
$stdin.close
```
tested on irb 0.9.6(09/06/30) and ruby 1.9.3p194
[Answer]
# ~~10~~ 9 chars
A shorter variant on @daniero's answer:
```
String=1
-
```
This works at least in the default OS X Mavericks Ruby (2.0.0).
The answer basically relies on the fact that the Ruby `Token` function does a `case` on the input token. One of the cases checks against `String`, which has been redefined by the first line. This case fails, so the case falls through to the default, which assumes the object has an `ancestors` accessor (which it does not).
Because the "bug" is in the tokenizer, the first line won't fail because the line only takes effect after the parsing is finished. Thus, it only affects subsequent lines. Subsequent lines must contain some kind of operator in order to see the failure.
[Answer]
## 5 characters
```
ENV=0
```
(inspired by [@daniero](https://codegolf.stackexchange.com/users/4372/daniero)'s answer)
[Answer]
**5 characters**
```
$>=$<
```
Sets stdout to stdin which throws an error trying to open stdin for writing and crashes irb.
[Answer]
# 22 characters
```
def method_missing;end
```
Apparently it messes with some irb internals. (To fix it, add `self.` after `def`.)
[Answer]
# 12 characters
```
def send;end
```
As far as I know, there are four methods in the Object class which show this kind of behaviour:
```
send
method_missing
respond_to?
respond_to_missing?
```
[Answer]
# 5 Characters
```
IRB=0
```
Nothing disturbs IRB quite like redefining IRB.
[Answer]
# ~~12~~ 10 characters
```
exec"exec"
```
I don't know if this counts, because of the `exec`
[Answer]
# 8 characters
Similar to [chinese perl goth's answer](https://codegolf.stackexchange.com/a/22353/11261):
```
$>.close
```
`$>` is an alias for STDOUT.
[Answer]
# 26 + 1 = 27 characters
This isn't very golfy, but I was amused to discover it by accident and thought others might enjoy it.
```
class Fixnum;def +;end end
```
I added +1 to the score because you have to press Enter a second time after entering the above (but not +2 because no one else counted Enter).
]