Also, refactor tests for `Method#aliases` and use a neat trick with
Sets, when matching two arrays.
# Meh.
[:a, :b, :c] == [:c, :b, :a] # => false
# Yarr!
Set.new([:a, :b, :c]) == Set.new([:c, :b, :a]) # => true
Last but not least, this commit fixes build errors on different rubies
(well, I hope so!).
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
Fix issue #367 (stat command should display the list of aliases for a
given method).
You can get a list of aliases for a method like this:
pry(main)> stat Array#map
Method Information:
--
Name: map
Alias: collect
Owner: Array
Visibility: public
Type: Unbound
Arity: 0
Method Signature: map()
Source Location: Not found.
Note that `Method#aliases` returns an Array of strings on MRI 1.8 and
friends, while on MRI 1.9 it returns an Array of symbols.
Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>