1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Conrad Irwin
8bf265e19a Revert "Revert "Add support of aliases for Method""
This reverts commit d7ca93c62c.
2012-08-29 01:23:29 -07:00
Kyrylo Silin
d7ca93c62c Revert "Add support of aliases for Method"
This reverts commits:

  905bab4d7c

  be626cfada

The problem is that Travis CI does not like tests for some reason.

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
2012-08-29 09:56:05 +03:00
Kyrylo Silin
be626cfada Retouch #aliases so it returns Array<String>
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>
2012-08-28 02:08:05 +03:00
Kyrylo Silin
905bab4d7c Add support of aliases for Method
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>
2012-08-26 00:02:39 +03:00
Conrad Irwin
ac68f843a3 Fix show-source and show-doc on __binding__/__binding_impl__ 2012-06-10 23:42:14 -07:00
Conrad Irwin
b587941931 Fix and test Pry::Method#super in the module case 2012-01-31 23:06:02 -08:00
Conrad Irwin
30e1e0941e Use Helpers::BaseHelpers.<foo>? MOAR 2011-12-27 23:16:53 +00:00
Conrad Irwin
26cef7e411 Pry::Method.from_binding support for super methods. [Fixes #378] 2011-12-24 00:15:04 +00:00
Ryan Fitzgerald
0efd6e1b1d improve method name guessing 2011-11-26 18:33:13 -08:00
Conrad Irwin
c211912a72 Make "ls" robust to overridden send 2011-10-08 17:47:27 -07:00
Conrad Irwin
fd26a55627 Add (instance_)resolution_order to Pry::Method 2011-10-08 17:47:26 -07:00
Conrad Irwin
f140c5379a Add all_from_(obj|class) methods to Pry::Method
This is the core part of an "ls" implementation.
2011-10-08 17:47:26 -07:00
Conrad Irwin
4dc9d27cf6 make sure Pry::Method#name returns a String. 2011-10-08 17:46:53 -07:00
Ryan Fitzgerald
7c43bcfe58 update commands and tests to use Pry::Method 2011-09-22 01:20:32 -07:00