mruby/mruby — pull request #1178 by h2so5 (2013-04-14 05:15:39+00:00)
Title: Add mruby-range-ext

Added the following methods.

- Range#cover?
- Range#first (redefinition, accepts an optional argument)
- Range#last (redefinition, accepts an optional argument)

```bash
$ mirb
mirb - Embeddable Interactive Ruby Shell

This is a very early version, please test and report errors.
Thanks :)

> (1..5).cover?(3)
=> true
> ("a".."l").cover?("m")
=> false
> (1..200).first(5)
=> [1, 2, 3, 4, 5]
> (1..200).last(6)
=> [195, 196, 197, 198, 199, 200]
> (1...300).last(4)
=> [296, 297, 298, 299]
>
```