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 Feb 10, 2013
  2. @rking

    Defuse time bomb on EditLine Readline wrapper

    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).
    rking committed with Feb 8, 2013
Commits on Feb 10, 2013
  1. @kyrylo

    InputCompleter: rescue when a nonexistent object is being completed

    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
    kyrylo committed Feb 10, 2013
  2. @rking @kyrylo
  3. @rking @kyrylo
  4. @rking @kyrylo

    Add a Procfile for testing foreman

    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
    rking committed with kyrylo Feb 7, 2013
  5. @rking @kyrylo

    Robustify the plugin require

    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).
    rking committed with kyrylo Feb 7, 2013
  6. @banister
  7. @banister
  8. @kyrylo

    .gemtest: remove the file

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

    Fix failing tests on rbx

    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.
    banister committed Feb 8, 2013
Commits on Feb 7, 2013
  1. @banister

    bump version

    banister committed Feb 7, 2013
  2. @banister

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

    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
    banister committed Feb 7, 2013
  3. @banister
  4. @banister

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

    * 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?)
    banister committed Feb 7, 2013
Commits on Feb 5, 2013
  1. @kyrylo
  2. @kyrylo

    correct_indentation ignores readline \001 & \002 sequences

    Eugene Diachkin committed with kyrylo Jan 22, 2013
  3. @kyrylo
  4. @ConradIrwin @kyrylo

    No more ree

    ConradIrwin committed with kyrylo Feb 3, 2013
  5. @rf- @kyrylo

    Add ruby-head to Travis

    rf- committed with kyrylo Jan 27, 2013
  6. @kyrylo

    WrappedModule#candidates: return Array on JRuby >=1.9

    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.
    kyrylo committed Feb 4, 2013
  7. @kyrylo

    BaseHelpers: add `#jruby_19?` method

    And remove some naive comments.
    kyrylo committed Feb 4, 2013
  8. @kyrylo

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

    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! )
    kyrylo committed Feb 4, 2013
  9. @ConradIrwin @kyrylo

    Add support for pry --gem

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

    Fix documentation rendering edge-cases [Fixes #795]

    Also added some notably absent tests
    ConradIrwin committed with kyrylo Feb 1, 2013
  11. @rking @kyrylo

    Tweak and Refactor Pry::Terminal

    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.
    rking committed with kyrylo Jan 30, 2013
Commits on Feb 3, 2013
  1. @banister

    Try to fix failing whereami test on 1.8 etc

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

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

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

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

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

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

    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)
    banister committed Feb 2, 2013
  5. @banister

    add a few rake task aliases

    banister committed Feb 2, 2013
  6. @kyrylo

    Refactor the way commands are required

    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.
    kyrylo committed Feb 2, 2013