aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pp.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/open-uri.rb: Remove indicator for "frozen_string_literal: true".akr2015-11-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/pp.rb: Ditto. * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/securerandom.rb: Ditto. * lib/tmpdir.rb: Ditto. * lib/unicode_normalize/tables.rb: Ditto. * test/net/ftp/test_buffered_socket.rb: Ditto. * test/net/ftp/test_mlsx_entry.rb: Ditto. * test/open-uri/test_open-uri.rb: Ditto. * test/open-uri/test_ssl.rb: Ditto. * test/pathname/test_pathname.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. * ext/pathname/lib/pathname.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Put an line before "frozen_string_literal: true" for emacs.akr2015-10-051-0/+1
| | | | | | | https://bugs.ruby-lang.org/issues/8976#note-49 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Use frozen_string_literal: true.akr2015-10-051-2/+4
| | | | | | | | | | | | | | | | | | * lib/prettyprint.rb: Ditto. * lib/resolv.rb: Ditto. * lib/tmpdir.rb: Ditto. * test/test_pp.rb: Ditto. * test/test_prettyprint.rb: Ditto. * tool/transcode-tblgen.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (File::Stat#pritty_print): some platforms (such as Windows)usa2014-12-051-2/+4
| | | | | | | does not have major/minor parts of device. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (object_address_group): Use Kernel#to_s to obtain the classakr2013-10-221-13/+3
| | | | | | | | | | | name and object address. This fix a problem caused by %p in C generates variable length address. Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bootstraptest/test_autoload.rb, bootstraptest/test_method.rb:shugo2013-06-131-3/+3
| | | | | | | | | remove tests for $SAFE=4. * lib/pp.rb: use taint instead of untrust to avoid warnings when $VERBOSE is set to true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Revert part of r40834 and nodoc PP::ObjectMixinzzak2013-05-201-29/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-05-191-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Document PP::ObjectMixin [Fixes GH-312]zzak2013-05-191-0/+28
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Update PP module overview by @geopetzzak2013-04-281-13/+26
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb, lib/prettyprint.rb: Documentation for PP and PrettyPrintzzak2013-02-101-33/+58
| | | | | | | Based on a patch by Vincent Batts [ruby-core:51253] [Bug #7656] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Kernel#inspect: improve consistency and do not call #to_s.eregon2012-08-151-10/+1
| | | | | | | | | | | | | | | | | | | | * object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class can now benefit from the nice default #inspect even if it defines #to_s. Also, there is no more unexpected change in #inspect result. * NEWS: Add note about the change. * bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*): Adapt internal structures (by aliasing #inspect to #to_s) so they don't rely on the removed behavior (#inspect calling overridden #to_s). * test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect. * lib/pp.rb (class PP): do not call #to_s anymore, as #inspect no more does (mame). * test/test_pp.rb (class PPInspectTest): remove related assertion (mame). [ruby-core:43238][Feature #6130] * test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown): adapt DRb tests with the new change (shirosaki). [ruby-core:47182][Bug #6866] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r36699 and r36700. [Feature #6130]naruse2012-08-151-1/+10
| | | | | | | | | | | | | Revert "Kernel#inspect: improve consistency and do not call #to_s." Revert "update PP with recent Kernel#inspect change. Patch by Yusuke Endoh." r36699 cause test-all failure on test/drb/test_drb.rb and test/drb/test_drbssl.rb. Run test-all before commit. Moreover its ChangeLog formst is wrong: see CommitterHowto https://bugs.ruby-lang.org/projects/ruby/wiki/CommitterHowto#ChangeLog git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update PP with recent Kernel#inspect change. Patch by Yusuke Endoh.eregon2012-08-141-10/+1
| | | | | | | | * lib/pp.rb (class PP): do not call #to_s anymore, as #inspect no more does. * test/test_pp.rb (class PPInspectTest): remove related assertion. [ruby-core:43238][Feature #6130] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: fix rdoc.ktsj2011-12-041-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: Move PP documentation to top of class PP. Patch bydrbrain2011-10-101-22/+21
| | | | | | | Sylvain Daubert. [Ruby 1.9 - Bug #5430] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: describe superclasses explicitly.akr2010-08-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: use [""].pack("p").size to detect the pointer size.akr2010-04-241-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::ObjectMixin#pretty_print): use to_s regardless ofakr2009-11-071-3/+2
| | | | | | | instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (Kernel#pp): returns its arguments, like Kernel#p.mame2009-09-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP:ObjectMixin#pretty_print): delegates has no inspectakr2009-09-271-2/+16
| | | | | | | method. [ruby-core:25804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (guard_inspect_key): untrust internal hash to preventmame2009-08-041-3/+3
| | | | | | | | unexpected SecurityError. * test/ruby/test_object.rb: add a test for [ruby-dev:38982]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (Struct#pretty_print): coerce to a string sincenobu2009-04-271-1/+1
| | | | | | | anonymous class has name no longer. [ruby-dev:38349] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_pp.rb: extract from lib/pp.rb.akr2009-02-141-183/+0
| | | | | | | | | * test/test_prettyprint.rb: extract from lib/prettyprint.rb. * test/test_tsort.rb: extract from lib/tsort.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* trailing spaces removed.akr2008-09-141-27/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_names): new method Regexp#names.akr2007-12-091-2/+16
| | | | | | | | | | | (rb_reg_named_captures): new method Regexp#named_captures (match_regexp): new method MatchData#regexp. (match_names): new method MatchData#names. * lib/pp.rb (MatchData#pretty_print): show names of named captures. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: use Hash for recursion check as inspect.akr2007-12-071-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* refine doc.akr2007-11-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods#pp_hash): don't sort keys because hash isakr2007-10-141-10/+6
| | | | | | | | ordered. (ENV.pretty_print): call pp_hash with sorted hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods#pp_hash): sort condition changed:akr2007-07-071-4/+5
| | | | | | | all keys have a same class which is kind of Comparable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods#pp_hash): sort ifakr2007-07-071-1/+8
| | | | | | | | all keys are strings, symbols or integers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: call original "method" method instead of redefined one.akr2007-06-071-3/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods::seplist): revert last change to workmatz2007-06-051-2/+2
| | | | | | around wrapper bug. [ruby-dev:30840] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bignorm): sizeof(long) may be smaller thanmatz2006-07-111-2/+2
| | | | | | | | | | | sizeof(VALUE). [ruby-dev:29013] * ruby.h (FIXNUM_MAX): fixnum may be bigger than long. * ruby.h (SIGNED_VALUE): signed integer of size of VALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cached rdoc diagrams, private rdoc comments, minor clarifications in ↵ryan2006-07-081-1/+1
| | | | | | debug.rb and pp.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods::seplist): should have preservedmatz2006-06-211-3/+3
| | | | | | | original reference to the array. [ruby-dev:28747] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (Kernel#pretty_inspect): defined for pretty printedakr2006-06-161-1/+9
| | | | | | | string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP.mcall): new method.akr2006-05-131-3/+15
| | | | | | | | | (Struct#pretty_print): call Kernel#class and Struct#members even if overriden. (Struct#pretty_print_cycle): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* A trick for negative address removed.akr2005-11-301-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog lib/pp.rbakr2005-11-301-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods#object_address_group): adjust address format.akr2005-11-281-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods#guard_inspect_key): supportakr2005-03-091-10/+14
| | | | | | | __recursive_key__. [ruby-dev:25821] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (inspect_obj): unintended space removal.matz2005-03-071-7/+17
| | | | | | | | | | | | | [ruby-dev:25810] * eval.c (rb_exec_recursive): should not use NODE in disclosed context. [ruby-dev:25812] * io.c (rb_f_open): need not to check if to_open value is a T_FILE. [ruby-dev:25812] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb: rdoced by Sam Roberts.akr2005-03-061-149/+118
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (File::Stat#pretty_print): Etc.getpwuid and Etc.getgrgidakr2005-03-061-4/+8
| | | | | | | | may return nil. [ruby-talk:129826] reported by Daniel Berger. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP#object_address_group): remove odd number of 'f'nobu2004-11-141-1/+3
| | | | | | | prefixed to negative address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * (lib/pp.rb, lib/prettyprint.rb): define seplist in PP::PPMethodsakr2004-03-271-0/+46
| | | | | | | instead of PrettyPrint. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pathname.rb: use assert_raise instead of assert_raises.akr2004-02-111-1/+1
| | | | | | | | | | | | * lib/pp.rb: ditto. * lib/time.rb: ditto. * lib/tsort.rb: ditto. use TSortHash and TSortArray instead of Hash and Array in test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* wrong commit.nobu2004-02-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP::PPMethods::object_address_group): suppress negativenobu2004-02-081-1/+1
| | | | | | | sign for higher heap areas. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e