From: v.ondruch@... Date: 2018-02-23T17:09:45+00:00 Subject: [ruby-core:85779] [Ruby trunk Feature#14473] Add Range#subrange? Issue #14473 has been updated by vo.x (Vit Ondruch). Why not modify Range#include? to accept Range object. Anyway, there is missing any justification for the RFE. ---------------------------------------- Feature #14473: Add Range#subrange? https://bugs.ruby-lang.org/issues/14473#change-70628 * Author: greggzst (Grzegorz Jakubiak) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Hi there, I'd like to propose a method that returns true when a range that the method gets called on is a subrange of a range passed in as an argument. Example: ~~~ ruby (2..4).subrange?(1...4) => true (-2..2).subrange?(-1..3) => false ~~~ ---Files-------------------------------- 0001-range.c-add-subset-superset-methods.patch (8.84 KB) v2-0001-range.c-add-subset-superset-methods.patch (8.85 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: