Careful with calls to `#intern` -- it might not be a problem here, but symbols (which is what `#intern` gives you) are not GC'd, so if you end up with lots of them, it can cause memory leaks. Here, you should always be getting an integer, so we're probably fine.

I'd also use `#to_sym` instead of `#intern` -- nobody really uses the latter.