From: nobu@... Date: 2016-09-08T04:46:49+00:00 Subject: [ruby-core:77213] [Ruby trunk Feature#12734][Feedback] `Array#flat?` Issue #12734 has been updated by Nobuyoshi Nakada. Status changed from Open to Feedback Please explain the use-case. It doesn't seem useful to me. ---------------------------------------- Feature #12734: `Array#flat?` https://bugs.ruby-lang.org/issues/12734#change-60431 * Author: Stefan Sch����ler * Status: Feedback * Priority: Normal * Assignee: ---------------------------------------- It might be useful to have a method that determines whether an array is flat, i.e. one-dimensional. ~~~ruby [1, 2, 3].flat? #=> true [1, [2, 3]].flat? #=> false ~~~ The result should be equivalent to `ary == ary.flatten` (without the overhead of actually flattening the array) -- https://bugs.ruby-lang.org/ Unsubscribe: