diff options
| author | Robert | 2017-05-02 22:10:31 +0200 |
|---|---|---|
| committer | Robert | 2017-05-02 22:10:31 +0200 |
| commit | e89703a1646711ea2387e6058765aa3c6b953971 (patch) | |
| tree | 77a2fb1bc960587e17bb48409b89ee4d5b0d4f88 /lib | |
| parent | cd8b08325558f6339e953b69fa64fa58a90bf3f2 (diff) | |
| download | chouette-core-e89703a1646711ea2387e6058765aa3c6b953971.tar.bz2 | |
more duplicates of Range#intersection removed and range_ext required instead
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/range_ext.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/range_ext.rb b/lib/range_ext.rb index 729cd1092..f1df5e70d 100644 --- a/lib/range_ext.rb +++ b/lib/range_ext.rb @@ -1,4 +1,5 @@ class Range + def intersection(other) return nil if (self.max < other.min or other.max < self.min) [self.min, other.min].max..[self.max, other.max].min |
