1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

14 commits

Author SHA1 Message Date
naruse
3e92b635fb Add frozen_string_literal: false for all files
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
2015-12-16 05:07:31 +00:00
nobu
88d28fb7cd vsnprintf.c: fix buffer overflow
* vsnprintf.c (MAXEXP, MAXFRACT): calculate depending on constants in
  float.h.
* vsnprintf.c (BSD_vfprintf): limit length for cvt() to get rid of
  buffer overflow.  [ruby-core:57023] [Bug #8864]
* vsnprintf.c (exponent): make expbuf size more precise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-12 11:07:30 +00:00
nobu
326980f6fd test_sprintf_comb.rb: split tests
* test/ruby/test_sprintf_comb.rb (test_format_integer),
  (test_format_float): split huge tests by the formats.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-11 03:00:42 +00:00
naruse
8a0cd16de1 Revert "* sprintf.c (rb_str_format): fix: sprintf with hex format and"
This reverts commit a160986d90.
Revert wrong commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-15 08:31:58 +00:00
naruse
a160986d90 * sprintf.c (rb_str_format): fix: sprintf with hex format and
precision includes wrong dots.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-15 08:28:12 +00:00
akr
37679ee584 supress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25 23:12:50 +00:00
akr
4dbc8e2454 add test for %B.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-14 14:08:36 +00:00
matz
6b36f117f2 * prelude.rb (require_relative): move require_relative from
lib/require_relative.rb.  [ruby-core:16356]

* lib/require_relative.rb: removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12 14:50:18 +00:00
akr
67151cd7af update sprintf rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-07 08:31:41 +00:00
akr
579f16d985 add tests for float format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 16:24:09 +00:00
akr
00bf4e8a84 * test/ruby/allpairs.rb: new file for all pairs method.
* test/ruby/test_m17n_comb.rb: use allpairs.rb to reduce test cases.

* test/ruby/test_sprintf_comb.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-01 04:12:13 +00:00
matz
18e70b266f * sprintf.c (rb_str_format): "%#.0o" should keep prefix where
"%#.0x" should not.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-01 00:38:33 +00:00
akr
7560adca78 make combination recursionless.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 19:49:37 +00:00
akr
a470a2f1e1 combinational tests for printf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 04:42:36 +00:00