Project

General

Profile

Actions

Feature #6317

open

Range#cover?の引数としてRangeインスタンスを受けられるようにして欲しい

Added by masaakiaoyagi (Masaaki Aoyagi) over 12 years ago. Updated 8 months ago.

Status:
Assigned
Target version:
-
[ruby-dev:45532]

Description

青柳と申します。

以下のように、Range#cover?の引数としてRangeインスタンスを
受けられるようにして欲しいです。
(1..4).cover?(2..3) # => true
(1..4).cover?(0..3) # => false

取り敢えず実装してみましたので、添付いたします。


Files

range_cover.diff (2.17 KB) range_cover.diff masaakiaoyagi (Masaaki Aoyagi), 04/18/2012 08:51 PM

Updated by mame (Yusuke Endoh) over 12 years ago

  • Status changed from Open to Assigned
  • Assignee set to matz (Yukihiro Matsumoto)

Updated by yhara (Yutaka HARA) about 12 years ago

  • Category set to core
  • Target version set to 2.6
Actions #3

Updated by naruse (Yui NARUSE) almost 7 years ago

  • Target version deleted (2.6)

Updated by matheusrich (Matheus Richard) 8 months ago

@mame (Yusuke Endoh) @naruse (Yui NARUSE) This currently works on Ruby. Can we close this as completed?

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0