Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove (c)transpose no-op for Strings and revise associated test.
Browse files Browse the repository at this point in the history
Sacha0 committed Jul 8, 2016

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent 060a51c commit 759dba3
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions base/strings/basic.jl
Original file line number Diff line number Diff line change
@@ -101,8 +101,6 @@ function length(s::AbstractString)
end
end

transpose(s::AbstractString) = s

## string comparison functions ##

function cmp(a::AbstractString, b::AbstractString)
2 changes: 1 addition & 1 deletion test/strings/basic.jl
Original file line number Diff line number Diff line change
@@ -464,7 +464,7 @@ foobaz(ch) = reinterpret(Char, typemax(UInt32))

@test "a".*["b","c"] == ["ab","ac"]
@test ["b","c"].*"a" == ["ba","ca"]
@test ["a","b"].*["c","d"]' == ["ac" "ad"; "bc" "bd"]
@test ["a","b"].*["c" "d"] == ["ac" "ad"; "bc" "bd"]

# Make sure NULL pointers are handled consistently by String
@test_throws ArgumentError unsafe_string(Ptr{UInt8}(0))

0 comments on commit 759dba3

Please sign in to comment.