Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

_out_ should dup objects ? #825

Open
banister opened this Issue · 7 comments

4 participants

@banister
Owner

when i gisted a session i got the following output

But i expected this output.

If we dupped the result object before sticking it in _out_ we could avoid this problem (we'd have to make exceptions for non-duppable objects, of course)

@rf-
Owner

I think I'd prefer saving the formatted string for each entry in _out_ instead of trying to dup things.

@banister
Owner

@rf- that's probably better, but would prevent them setting up a separate inspect for gist, but that's not a big deal.

@rking
Collaborator

But _out_ is useful for referencing as an object. E.g. it's the reason why we didn't have to have 3-underscore and 4-underscore and 5-underscore vars, since _out_[-3] and so forth work.

How about an _outs_ or something?

@banister
Owner

@rking we'd keep _out_ referencing the objects themselves, i was thinking more about a parallel array for storing the associated inspect. The array (i dont think) needs to be exposed inside the pry session, but it could be useful for commands to access, i.e gist :)

@rking
Collaborator
@ConradIrwin
Owner

It doesn't need to be a special local (I never use _in_ either), but it'd be useful to have a record.

@ghost

hi @banister - perhaps related is this: https://github.com/pry/pry/blob/master/lib/pry/config/behavior.rb#L108-L114
we duplicate configuration values unless they're of some type in NODUP. _in_ and _out_ aren't part of that, though, I believe.

@rf- rf- added feature and removed bug labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.