Skip to content

Commit 8e92183

Browse files
committed
Clean up and fix typos
1 parent d74f90e commit 8e92183

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

spec/ruby/core/kernel/shared/sprintf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,11 +409,11 @@ def obj.to_str
409409
@method.call("%4.6s", "abcdefg").should == "abcdef"
410410
end
411411

412-
it "formats nli with width" do
412+
it "formats nil with width" do
413413
@method.call("%6s", nil).should == " "
414414
end
415415

416-
it "formats nli with precision" do
416+
it "formats nil with precision" do
417417
@method.call("%.6s", nil).should == ""
418418
end
419419

spec/ruby/core/kernel/shared/sprintf_encoding.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
result.encoding.should equal(Encoding::UTF_8)
2828
end
2929

30-
it "raises Encoding::CompatibilityError if both encodings are ASCII compatible and there ano not ASCII characters" do
30+
it "raises Encoding::CompatibilityError if both encodings are ASCII compatible and there are not ASCII characters" do
3131
string = "Ä %s".encode('windows-1252')
3232
argument = "Ђ".encode('windows-1251')
3333

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
fails:Kernel#sprintf returns a String in the argument's encoding if format encoding is more restrictive
2-
fails:Kernel#sprintf raises Encoding::CompatibilityError if both encodings are ASCII compatible and there ano not ASCII characters
2+
fails:Kernel#sprintf raises Encoding::CompatibilityError if both encodings are ASCII compatible and there are not ASCII characters
33
fails:Kernel#sprintf other formats s does not try to convert with to_str
44
fails:Kernel#sprintf flags # applies to format o does nothing for negative argument
55
fails:Kernel#sprintf flags # applies to formats bBxX does nothing for zero argument
66
fails:Kernel.sprintf returns a String in the argument's encoding if format encoding is more restrictive
7-
fails:Kernel.sprintf raises Encoding::CompatibilityError if both encodings are ASCII compatible and there ano not ASCII characters
7+
fails:Kernel.sprintf raises Encoding::CompatibilityError if both encodings are ASCII compatible and there are not ASCII characters
88
fails:Kernel.sprintf other formats s does not try to convert with to_str
99
fails:Kernel.sprintf flags # applies to format o does nothing for negative argument
1010
fails:Kernel.sprintf flags # applies to formats bBxX does nothing for zero argument

spec/tags/core/string/modulo_tags.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
fails:String#% output's encoding negotiates a compatible encoding if necessary
22
fails:String#% output's encoding raises if a compatible encoding can't be found
33
fails:String#% returns a String in the argument's encoding if format encoding is more restrictive
4-
fails:String#% raises Encoding::CompatibilityError if both encodings are ASCII compatible and there ano not ASCII characters
4+
fails:String#% raises Encoding::CompatibilityError if both encodings are ASCII compatible and there are not ASCII characters
55
fails:String#% other formats s does not try to convert with to_str
66
fails:String#% flags # applies to format o does nothing for negative argument
77
fails:String#% flags # applies to formats bBxX does nothing for zero argument

src/main/java/org/truffleruby/core/format/format/FormatFloatGenericNode.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ protected final byte[] formatNumber(int origWidth, int precision, Object value)
193193
buf.append(' ', width);
194194
appendNumber(digits, buf, 0);
195195
}
196-
width = 0;
197196
} else {
198197
appendNumber(digits, buf, 0);
199198
if (width > 0) {

0 commit comments

Comments
 (0)