Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 12, 2013
  1. @banister
Commits on Feb 11, 2013
  1. @rking

    Reopen Readline.output if it is not a tty

    rking committed with
  2. @rking

    Defuse time bomb on EditLine Readline wrapper

    rking committed with
    If you are using the basic OS X Readline impl, and you Pry.auto_resize!,
    you'll find that their Readline.set_screen_size = ___ segfaults.
    Instead of letting this happen, we'll tell the user about it and point
    them to the fix (of using GNU Readline).
Commits on Feb 10, 2013
  1. @kyrylo

    InputCompleter: rescue when a nonexistent object is being completed

    kyrylo committed
    Fix issue #841 (Trying to auto complete file paths produces an error)
    The real reason why the user gets the error is that Pry cannot tab
    complete file paths *without* Bond. Instead of tab completing a file
    path, it tries to tab complete an *object path*. The fix consists in
    rescuing the `Pry::CommandError`. In return, you get funky completions
    like these:
      [1] pry(main)> l/l
      l/lambda           l/ln               l/ln_sf
      l/link             l/ln_s             l/load
  2. @rking @kyrylo
  3. @rking @kyrylo
  4. @rking @kyrylo

    Add a Procfile for testing foreman

    rking committed with kyrylo
    The foreman run isn't terribly special, but it's another stdio situation
    that people get into in real life.
    So this is just a way to check that same scenario. For now, no
    automation is in place (or necessary?), but it's something to tinker
    with via:
        gem install foreman && cd spec && foreman start
  5. @rking @kyrylo

    Robustify the plugin require

    rking committed with kyrylo
    I was getting trouble with both pry-editline and pry-syntax-hacks, while
    running with a newly-compiled-Ruby with GNU Readline on a Mac (the
    default Readline was working OK with these. There could be more
    investigation about the error, but for now, at least pry boots with a
    handy error instead of a total failure).
  6. @banister
  7. @banister
  8. @kyrylo

    .gemtest: remove the file

    kyrylo committed
    We use Travis CI nowadays.
Commits on Feb 8, 2013
  1. @banister

    Fix failing tests on rbx

    banister committed
    The failures were due to Rbx recovering more source than expected (compared to MRI)
    For example, the following fails in MRI:
    module M
    module N
      include M
    show-source N
    but on rbx it succeeds and shows the source of N
    How does rbx do it? It appears to create a secret method called __module_init__ on a module whenever you include another module.
    This method has its source_location set to the `include` line.
Commits on Feb 7, 2013
  1. @banister

    bump version

    banister committed
  2. @banister

    Make show-source/show-doc fall-back to superclass

    banister committed
    When performing show-source/show-doc on a class whose code
    cannot be extracted we now fall-back to its first accessible superclass
    and show its code together with a warning.
    class Model < ActiveRecord::Base
    show-source Model #=> shows ActiveRecord::Base code
  3. @banister
  4. @banister

    Pry::WrappedModule: add module? and class? predicates

    banister committed
    * module? whether the object is *strictly* a module (using instance_of?, does not match classes)
    * class? must be a direct instance of Class (using instance_of?)
Commits on Feb 5, 2013
  1. @kyrylo
  2. @kyrylo

    correct_indentation ignores readline \001 & \002 sequences

    Eugene Diachkin committed with kyrylo
  3. @kyrylo
  4. @ConradIrwin @kyrylo

    No more ree

    ConradIrwin committed with kyrylo
  5. @rf- @kyrylo

    Add ruby-head to Travis

    rf- committed with kyrylo
  6. @kyrylo

    WrappedModule#candidates: return Array on JRuby >=1.9

    kyrylo committed
    JRuby 1.9 has a nasty bug with `Enumerator#find_index`, which we utilise
    in the code of `whereami` command.
    More information on the bug: jruby/jruby#525
    Simply return an Array, formed from the original Enumerator on JRuby 1.9
    and higher. This kills the efficiency, but leastwise, it will be
    As a bonus, remove some a junk method.
  7. @kyrylo

    BaseHelpers: add `#jruby_19?` method

    kyrylo committed
    And remove some naive comments.
  8. @kyrylo

    Terminal: don't let Readline return [0, 0]

    kyrylo committed
    Some of the tests from "spec/commands/ls_spec.rb" were failing on
    Rubinius and 1.9.2. The problems was introduced by this commit:
      (Tweak and Refactor Pry::Terminal)
    The problem is that `Readline.get_screen_size` can return `[0, 0]`.
    That's not good, because it breaks a couple of our tests (table output
    stuff). But now...
              .o( is fixed. Twit-twoo! )
  9. @ConradIrwin @kyrylo

    Add support for pry --gem

    ConradIrwin committed with kyrylo
    I am always doing pry -I./lib -r<gemname>.
  10. @ConradIrwin @kyrylo

    Fix documentation rendering edge-cases [Fixes #795]

    ConradIrwin committed with kyrylo
    Also added some notably absent tests
  11. @rking @kyrylo

    Tweak and Refactor Pry::Terminal

    rking committed with kyrylo
    The biggest behavior change is to favor `io/console` (but still not when
    on jruby). The previous favorite was `Readline.get_screen_size`, but
    that thing is stale just like the env. The only reason it gets updated
    is if you put `Pry.auto_resize!` in your `~/.pryrc`
    The next change is more error handling in `Pry.auto_resize!`
    Otherwise I renamed `TerminalInfo` to `Terminal`, which is something
    andrewvos and I discussed way back when `TerminalInfo` first came about.
    The rest was a little Extract Method stuff, no biggie.
Commits on Feb 3, 2013
  1. @banister

    Try to fix failing whereami test on 1.8 etc

    banister committed
    Explicitly calling to_s before appending wth + "\n"
  2. @banister
Commits on Feb 2, 2013
  1. @banister
  2. @banister

    Add -m, -c, -f options to whereami command.

    banister committed
    -m, the current method in its totality
    -c, the current class/module that is the current 'candidate' (monkeypatch)
    -f, the entire file
  3. @banister

    Pry::WrappedModule: Switch the candidate/start_line args.

    banister committed
    Makes the API more convenient as we're more likely to provide a candidate arg
    than start_line arg.
  4. @banister

    Refactor Pry::Method + add Pry::Method::WeirdMethodLocator

    banister committed
    WeirdMethodLocator is used by Pry::Method.from_binding() to locate the
    method captured by the binding when the naive approach fails (i.e method(binding.eval('__method__')).
    "WeirdMethods" include methods defined on the superclass to the 'self' of the binding, as well as methods
    that have subsequently been renamed/replaced.
    We also move Pry::Method::Disowned to its own file (disowned.rb)
  5. @banister

    add a few rake task aliases

    banister committed
  6. @kyrylo

    Refactor the way commands are required

    kyrylo committed
    Fix issue #834 (pry- failing on Windows 7 64 bit - cannot load
    such file)
    The problem was introduced by this commit:
    This bug affects *only* Ruby 1.9.3p327, on Windows.
                Choose your destiny
        |                                |
      is bugged on
      Ruby 1.9.3p327
    This fix is simply an ugly workaround.
Something went wrong with that request. Please try again.