Skip to content

Commit

Permalink
Minor typos, rewordings, indentation changes
Browse files Browse the repository at this point in the history
fix plaform typo

capitalize first word in doctstring sentences

reword NEWS

minor rewording in doc/src/manual/arrays.md

(see Sacha0 review on PR 20125)

there are live cells

adjust spacing

adjust some indentation in test/parse.jl

remove empty line at end of docstring

grammar fix in a comment

move comma to end of line instead of start of next line

reword a little to avoid saying specified twice in rapid succession

4 space indent in const_datatype_getfield_tfunc
  • Loading branch information
tkelman committed Feb 2, 2017
1 parent 7620495 commit db6f731
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 33 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Breaking changes
This section lists changes that do not have deprecation warnings.

* `readline`, `readlines` and `eachline` return lines without line endings by default.
You *must* use `readline(s, chomp=false)`, etc. to get the old behavior where lines
returned include trailing end-of-line character(s). ([#19944])
You *must* use `readline(s, chomp=false)`, etc. to get the old behavior where
returned lines include trailing end-of-line character(s). ([#19944])

* `String`s no longer have a `.data` field (as part of a significant performance
improvement). Use `Vector{UInt8}(str)` to access a string as a byte array.
Expand Down
4 changes: 2 additions & 2 deletions base/dates/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ function tryparsenext end
"""
format(io::IO, tok::AbstractDateToken, dt::TimeType, locale)
format the `tok` token from `dt` and write it to `io`. The formatting can
Format the `tok` token from `dt` and write it to `io`. The formatting can
be based on `locale`.
all subtypes of `AbstractDateToken` must define this method in order
All subtypes of `AbstractDateToken` must define this method in order
to be able to print a Date / DateTime object according to a `DateFormat`
containing that token.
"""
Expand Down
14 changes: 7 additions & 7 deletions base/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -707,13 +707,13 @@ const TypeName_module_fieldindex = fieldindex(TypeName, :module)
const TypeName_wrapper_fieldindex = fieldindex(TypeName, :wrapper)

function const_datatype_getfield_tfunc(sv, fld)
if (fld == DataType_name_fieldindex ||
fld == DataType_parameters_fieldindex ||
fld == DataType_types_fieldindex ||
fld == DataType_super_fieldindex)
return abstract_eval_constant(getfield(sv, fld))
end
return nothing
if (fld == DataType_name_fieldindex ||
fld == DataType_parameters_fieldindex ||
fld == DataType_types_fieldindex ||
fld == DataType_super_fieldindex)
return abstract_eval_constant(getfield(sv, fld))
end
return nothing
end

# returns (type, isexact)
Expand Down
2 changes: 1 addition & 1 deletion base/libgit2/reference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ end
"""
upstream(ref::GitReference) -> Nullable{GitReference}
Determine if the branch specified by `ref` has a specified upstream branch.
Determine if the branch containing `ref` has a specified upstream branch.
`upstream` returns a `Nullable`, which will be null if the requested branch does
not have an upstream counterpart. If the upstream branch does exist, the `Nullable`
Expand Down
1 change: 0 additions & 1 deletion base/libgit2/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ buf_ref = Ref(Buffer())
free(buf_ref)
```
In particular, note that `LibGit2.free` should be called afterward on the `Ref` object.
"""
immutable Buffer
ptr::Ptr{Cchar}
Expand Down
12 changes: 6 additions & 6 deletions base/multimedia.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module Multimedia

export Display, display, pushdisplay, popdisplay, displayable, redisplay,
MIME, @MIME_str, reprmime, stringmime, istextmime,
mimewritable, TextDisplay
MIME, @MIME_str, reprmime, stringmime, istextmime,
mimewritable, TextDisplay

###########################################################################
# We define a singleton type MIME{mime symbol} for each MIME type, so
Expand Down Expand Up @@ -194,7 +194,7 @@ function display(x)
return display(displays[i], x)
catch e
isa(e, MethodError) && e.f in (display, show) ||
rethrow()
rethrow()
end
end
end
Expand All @@ -208,7 +208,7 @@ function display(m::MIME, x)
return display(displays[i], m, x)
catch e
isa(e, MethodError) && e.f == display ||
rethrow()
rethrow()
end
end
end
Expand Down Expand Up @@ -240,7 +240,7 @@ function redisplay(x)
return redisplay(displays[i], x)
catch e
isa(e, MethodError) && e.f in (redisplay, display, show) ||
rethrow()
rethrow()
end
end
end
Expand All @@ -254,7 +254,7 @@ function redisplay(m::Union{MIME,AbstractString}, x)
return redisplay(displays[i], m, x)
catch e
isa(e, MethodError) && e.f in (redisplay, display) ||
rethrow()
rethrow()
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion doc/src/manual/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ behavior, should take care to create a copy of inputs that it may modify.

Many functions for constructing and initializing arrays are provided. In the following list of
such functions, calls with a `dims...` argument can either take a single tuple of dimension sizes
or a series of dimension sizes passed as a variable number of arguments. Most of the functions
or a series of dimension sizes passed as a variable number of arguments. Most of these functions
also accept a first input `T`, which is the element type of the array. If the type `T` is
omitted it will default to `Float64`.

Expand Down
2 changes: 1 addition & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ void jl_extern_c(jl_function_t *f, jl_value_t *rt, jl_value_t *argt, char *name)
#endif

#if defined(USE_ORCJIT) || defined(USE_MCJIT)
// make the alias name is valid for the current session
// make sure the alias name is valid for the current session
jl_ExecutionEngine->addGlobalMapping(GA, (void*)(uintptr_t)Addr);
#else
(void)GA; (void)Addr;
Expand Down
2 changes: 1 addition & 1 deletion src/gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ typedef struct {
// index of pool that owns this page
uint8_t pool_n;
// Whether any cell in the page is marked
// This bit is set before sweeping iff there's live cells in the page.
// This bit is set before sweeping iff there are live cells in the page.
// Note that before marking or after sweeping there can be live
// (and young) cells in the page for `!has_marked`.
uint8_t has_marked;
Expand Down
6 changes: 3 additions & 3 deletions test/dates/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ f = "ymd"
@test Dates.DateTime(string(dt)) == dt

# Vectorized
dr = ["2000-01-01", "2000-01-02", "2000-01-03", "2000-01-04", "2000-01-05"
, "2000-01-06", "2000-01-07", "2000-01-08", "2000-01-09", "2000-01-10"]
dr2 = [Dates.Date(2000):Dates.Date(2000, 1, 10);]
dr = ["2000-01-01", "2000-01-02", "2000-01-03", "2000-01-04", "2000-01-05",
"2000-01-06", "2000-01-07", "2000-01-08", "2000-01-09", "2000-01-10"]
dr2 = [Dates.Date(2000) : Dates.Date(2000, 1, 10);]
@test Dates.Date(dr) == dr2
@test Dates.Date(dr, "yyyy-mm-dd") == dr2
@test Dates.DateTime.(dr) == Dates.DateTime.(dr2)
Expand Down
10 changes: 5 additions & 5 deletions test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@ parse("""

# issue #13302
let p = parse("try
a
catch
b, c = t
end")
a
catch
b, c = t
end")
@test isa(p,Expr) && p.head === :try
@test p.args[2] === false
@test p.args[3].args[end] == parse("b,c = t")
Expand Down Expand Up @@ -420,7 +420,7 @@ test_parseerror("0x1.0p", "invalid numeric constant \"0x1.0\"")
# issue #19861 make sure macro-expansion happens in the newest world for top-level expression
@test eval(Base.parse_input_line("""
macro X19861()
return 23341
return 23341
end
@X19861
""")::Expr) == 23341
Expand Down
6 changes: 3 additions & 3 deletions test/spawn.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is a part of Julia. License is MIT: http:https://julialang.org/license

##################################
# Cross Plaform tests for spawn. #
##################################
###################################
# Cross Platform tests for spawn. #
###################################

valgrind_off = ccall(:jl_running_on_valgrind, Cint, ()) == 0

Expand Down

0 comments on commit db6f731

Please sign in to comment.