summaryrefslogtreecommitdiff
path: root/test/-ext-/test_printf.rb
AgeCommit message (Collapse)Author
2021-07-24Escape unprintable chars only, without surrounding quotesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4676
2019-11-18Deprecate taint/trust and related methods, and make the methods no-opsJeremy Evans
This removes the related tests, and puts the related specs behind version guards. This affects all code in lib, including some libraries that may want to support older versions of Ruby. Notes: Merged: https://github.com/ruby/ruby/pull/2476
2018-03-14quote symbolsnobu
* sprintf.c (ruby__sfvextra): quote symbols as identifiers. * string.c (rb_id_quote_unprintable): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09sprintf.c: NULL as strnobu
* sprintf.c (ruby_vsnprintf, ruby_snprintf): allow NULL as str, just count the expected buffer size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04* ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: removenobu
test for snprintf(3). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-25vsnprintf.c: fix string precisionnobu
* vsnprintf.c (BSD_vfprintf): fix string width when precision is given. as the result of `memchr` is NULL or its offset from the start cannot exceed the size, the comparison was always false. [ruby-core:62737] [Bug #9861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19vsnprintf.c: initialize cpnobu
* vsnprintf.c (BSD_vfprintf): initialize cp so that size is 0 in the commented case. fix an accidental bug at r16716. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30sprintf.c: QUOTE flagnobu
* sprintf.c (ruby__sfvextra): add QUOTE flag to escape unprintable characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13* test/-ext-/test_printf.rb, test/rss/test_parser.rb,shugo
test/ruby/test_array.rb, test/ruby/test_hash.rb, test/ruby/test_m17n.rb, test/ruby/test_marshal.rb, test/ruby/test_object.rb, test/ruby/test_string.rb: don't use untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-16test_printf.rb: need to be infectednobu
* test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use plain object so that the results of to_s and inspect are infected. [ruby-dev:46053] [Bug #6881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-15sprintf.c: infectnobu
* sprintf.c (ruby__sfvextra): the result should be infected by the given strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-15sprintf.c: coderange fixnobu
* sprintf.c (ruby__sfvwrite): set buffer length and exclude uninitialized garbage to get correct coderange. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-25* test/-ext-/test_printf.rb: tests for [Feature #5896].nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e