aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pp.rb
Commit message (Collapse)AuthorAgeFilesLines
* Mask RubyVM-specific testCharles Oliver Nutter2020-03-051-6/+8
|
* Remove empty keyword splats when calling even when using ruby2_keywordsJeremy Evans2020-01-231-1/+1
| | | | | | | | | Keeping empty keyword splats for ruby2_keywords methods was necessary in 2.7 to prevent the final positional hash being treated as keywords. Now that keyword argument separation has been committed, the final positional hash is never treated as keywords, so there is no need to keep empty keyword splats when using ruby2_keywords.
* Add more direct test for pp with a ruby2_keywords HashBenoit Daloze2020-01-231-0/+1
|
* Fix pp when passed a empty ruby2_keywords-flagged hash as array elementJeremy Evans2020-01-221-0/+4
| | | | | | | | | | | | | | This causes problems because the hash is passed to a block not accepting keywords. Because the hash is empty and keyword flagged, it is removed before calling the block. This doesn't cause an ArgumentError because it is a block and not a lambda. Just like any other block not passed required arguments, arguments not passed are set to nil. Issues like this are a strong reason not to have ruby2_keywords by default. Fixes [Bug #16519]
* Make prettyprint’s cycle detection aware of Delegator instancesRichard Viney2019-12-161-0/+12
| | | | | | Fixes [Bug #13144] Co-Authored-By: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Suppress void context warnings in verbose modeNobuyoshi Nakada2019-06-301-3/+3
|
* test_pp.rb: show the node when failednobu2018-12-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add RubyVM::AST#pretty_printnobu2018-12-031-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 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-24/+26
| | | | | | | | | | | | | | | | | | * 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
* * test/test_pp.rb (PPTestModule::PPFileStatTest): test for r48719.usa2014-12-051-0/+8
| | | | | | | | is this the right place here? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:ko12012-10-271-4/+0
| | | | | | | | | | | | | | | | make all Float objects frozen. [ruby-dev:46081] [ruby-trunk - Feature #6936] Most part of patch by NARUSE, Yui <naruse@ruby-lang.org>. * class.c (singleton_class_of): raise TypeError when trying to define a singleton method on Float objects. * vm.c (vm_define_method): ditto. * test/ruby/marshaltestlib.rb: catch up above changes. * test/ruby/test_class.rb: ditto. * test/test_pp.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Kernel#inspect: improve consistency and do not call #to_s.eregon2012-08-151-1/+0
| | | | | | | | | | | | | | | | | | | | * 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-0/+1
| | | | | | | | | | | | | 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-1/+0
| | | | | | | | * 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 (PP::ObjectMixin#pretty_print): use to_s regardless ofakr2009-11-071-1/+0
| | | | | | | instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (PP:ObjectMixin#pretty_print): delegates has no inspectakr2009-09-271-0/+13
| | | | | | | method. [ruby-core:25804] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_pp.rb: extract from lib/pp.rb.akr2009-02-141-4/+180
| | | | | | | | | * 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
* * test/test_*.rb: Pathname#parent -> Pathname#dirname.nahi2004-01-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/inlinetest.rb, test/{test_generator.rb,test_ipaddr.rb,nahi2004-01-061-0/+4
test_pathname.rb,test_pp.rb,test_prettyprint.rb,test_set.rb, test_time.rb,test_tsort.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e