lib/bencode/string.rb in bencode_blatyo-1.0.0 vs lib/bencode/string.rb in bencode_blatyo-1.0.1
- old
+ new
@@ -9,11 +9,11 @@
# Encodes object into a bencoded string. BEncoded strings are length-prefixed base ten followed by a colon and
# the string.
#
# :symbol.bencode #=> "6:symbol"
#
- # @return [String] the bencoded string
+ # @return [::String] the bencoded string
def bencode
(respond_to?(:to_s) ? to_s : to_str).bencode
end
end
end
@@ -44,10 +44,10 @@
# Encodes a string into a bencoded string. BEncoded strings are length-prefixed base ten followed by a colon and
# the string.
#
# "string".bencode #=> "6:string"
#
- # @return [String] the bencoded string
+ # @return [::String] the bencoded string
def bencode
[length, ':', self].join
end
end
\ No newline at end of file