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

A few fixes for 0.6 #290

Merged
merged 1 commit into from
Nov 26, 2016
Merged

A few fixes for 0.6 #290

merged 1 commit into from
Nov 26, 2016

Conversation

yuyichao
Copy link
Contributor

  • num and den rename
  • takebuf_array rename
  • Fix $ in the test

# julia#19088
let io = IOBuffer()
write(io, "aaa")
@test take!(io) == UInt8['a', 'a', 'a']
Copy link
Member

Choose a reason for hiding this comment

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

Why not test String(take!(io)) too? Otherwise, +1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. It's actually tested twice above already.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, but it doesn't hurt to do that explicitly here too.

* `num` and `den` rename
* `takebuf_array` rename
* Fix `$` in the test
@stevengj stevengj merged commit 3541c2d into master Nov 26, 2016
@tkelman tkelman deleted the yyc/0.6-dev branch November 27, 2016 04:31
@@ -126,6 +126,10 @@ Currently, the `@compat` macro supports the following syntaxes:

* `$` is now `xor` or `⊻` [#18977](https://github.com/JuliaLang/julia/pull/18977).

* `num` and `den` are now `numerator` and `denominator` [#19246](https://github.com/JuliaLang/julia/pull/19246).

* `takebuf_array` is now a method of `take!`. `takebuf_string(io)` becomes `String(take!(io))` [#19088](https://github.com/JuliaLang/julia/pull/19088).
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be Compat.UTF8String(take!(io)) thanks to the Compat.String mess?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I believe takebuf_string on 0.4 is actually type unstable. It can return either ASCIIString or UTF8String.

Copy link
Member

Choose a reason for hiding this comment

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

Then we need to define a ByteString(::Array{UInt8}) method

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there anything that's broken? This won't work before the specific 0.4 commit but Compat.jl already require 0.4.0 now. Travis tests also seems to be passing on 0.4?

@stevengj
Copy link
Member

Right, sorry, we already have it

dpsanders pushed a commit to dpsanders/Compat.jl that referenced this pull request Feb 1, 2017
* `num` and `den` rename
* `takebuf_array` rename
* Fix `$` in the test
martinholters added a commit that referenced this pull request Aug 31, 2018
martinholters added a commit that referenced this pull request Aug 31, 2018
martinholters added a commit that referenced this pull request Aug 31, 2018
martinholters added a commit that referenced this pull request Aug 31, 2018
stevengj pushed a commit that referenced this pull request Sep 5, 2018
* Remove `take!(::Task)` definition for Julia versions prior to 0.6

Was added in #307.

* Remove `redirect_std*(f, stream)` definitions for Julia prior to v0.6

Were added in #275.

* Remove at-__DIR__ macro definition for Julia versions prior to 0.6

Was added in #281.

* Remove `broadcast` definition for equal-length tuples

Was added in #324 and #328

* Remove definitions of `unsafe_get` and `isnull` fallsback

Were added in #287.

* Remove defintions of `xor` and `⊻`

Were added in #289.

* Definitions of `numerator` and `denominator`

Were added in #290.

* Remove defintion of `iszero`

Was added in #305.

* Remove definition of `>:`

Was added in #336

* Remove definition of `take!(::Base.AbstractIOBuffer)`

Was added in #290.

* Remove definiton of `.&` and `.|`

Were added in #306.

* Remove definition of `Compat.isapprox`

Was added in #309.
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