Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some alternatives to deprecated operators are wrongly displayed #351

Merged
merged 4 commits into from Dec 20, 2017

Conversation

iht
Copy link
Contributor

@iht iht commented Dec 19, 2017

In the deprecation warning, the message suggests to change operators such as == by ==. (trailing dot), when the actual operator is .== (leading dot).

This pull request reports the correct names for those operators.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.957% when pulling d18cadb on iht:fix_deprecated into 761d19a on JuliaStats:master.

for f ∈ (:+, :-, :*, :%,
:|, :&, :<, :>, :(==), :(!=), :>=, :<=)
g = Symbol("." * string(f))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor style change

diff --git a/src/deprecated.jl b/src/deprecated.jl
index a6ad11b..bdd8170 100644
--- a/src/deprecated.jl
+++ b/src/deprecated.jl
@@ -24,14 +24,14 @@ for f ∈ (:abs, :sign, :sqrt, :cbrt,
 end

 for f ∈ (:^, :/)
-    g = Symbol("." * string(f))
+    g = Symbol(".", f)
     @eval import Base: $f
     @eval @deprecate $f(ta::TimeArray, args...) $g(ta, args...)
 end

 for f ∈ (:+, :-, :*, :%,
          :|, :&, :<, :>, :(==), :(!=), :>=, :<=)
-    g = Symbol("." * string(f))
+    g = Symbol(".", f)
     @eval import Base: $f
     @eval @deprecate $f(ta::TimeArray, args...) $g(ta, args...)
     @eval @deprecate $f(n::Number, ta::TimeArray) $g(n, ta)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.957% when pulling c702e51 on iht:fix_deprecated into 761d19a on JuliaStats:master.

@iblislin iblislin merged commit 2e2c24f into JuliaStats:master Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants