Skip to content

Commit 8328757

Browse files
maihaAry Borenszweig
authored and
Ary Borenszweig
committedJan 6, 2017
Fixed example codes
1 parent 8ab3a34 commit 8328757

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
 

‎src/array.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ class Array(T)
960960
# ```
961961
# a = [1, 2, 3]
962962
# sums = [] of Int32
963-
# a.each_permutation(2) { |p| sums << p.sum } # => [1, 2, 3]
963+
# a.each_permutation(2) { |p| sums << p.sum } # => nil
964964
# sums # => [3, 4, 3, 5, 4, 5]
965965
# ```
966966
#

‎src/big/big_int.cr

+3-3
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ struct BigInt < Int
289289
# Returns a string containing the representation of big radix base (2 through 36).
290290
#
291291
# ```
292-
# BigInt.new("123456789101101987654321").to_s(8) # => 32111154373025463465765261
293-
# BigInt.new("123456789101101987654321").to_s(16) # => 1a249b1f61599cd7eab1
294-
# BigInt.new("123456789101101987654321").to_s(36) # => k3qmt029k48nmpd
292+
# BigInt.new("123456789101101987654321").to_s(8) # => "32111154373025463465765261"
293+
# BigInt.new("123456789101101987654321").to_s(16) # => "1a249b1f61599cd7eab1"
294+
# BigInt.new("123456789101101987654321").to_s(36) # => "k3qmt029k48nmpd"
295295
# ```
296296
def to_s(base : Int)
297297
raise "Invalid base #{base}" unless 2 <= base <= 36

‎src/html.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module HTML
3939
# require "html"
4040
#
4141
# io = IO::Memory.new
42-
# HTML.escape("Crystal & You", io) # => "Crystal & You"
42+
# HTML.escape("Crystal & You", io) # => nil
4343
# io.to_s # => "Crystal &amp; You"
4444
# ```
4545
def self.escape(string : String, io : IO)

‎src/static_array.cr

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ struct StaticArray(T, N)
130130
#
131131
# ```
132132
# array = StaticArray(Int32, 3).new { |i| i + 1 }
133-
# array.[]= 2 # => 3
133+
# array.[]= 2 # => nil
134134
# array # => StaticArray[2, 2, 2]
135135
# ```
136136
def []=(value : T)

0 commit comments

Comments
 (0)
Please sign in to comment.