rbs icon indicating copy to clipboard operation
rbs copied to clipboard

bin/sort sorts private as though it were a method

Open connorshea opened this issue 5 years ago • 0 comments

private and protected shouldn't be sorted by bin/sort.

Input:

module Foo
  def baz: (*untyped) -> untyped

  private

  def foo: (*untyped) -> untyped

  def bar: (*untyped) -> untyped
end

Output:

module Foo
  private

  def bar: (*untyped) -> untyped

  def baz: (*untyped) -> untyped

  def foo: (*untyped) -> untyped
end

What I'd expect the output to look like, with the private methods sorted within themselves:

module Foo
  def baz: (*untyped) -> untyped

  private

  def bar: (*untyped) -> untyped

  def foo: (*untyped) -> untyped
end

connorshea avatar Mar 14 '20 22:03 connorshea