Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 832875707b24
Choose a base ref
...
head repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d1f8c42f82d3
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 6, 2017

  1. Benchmark: move non-release warning to runtime

    So we don't see this warning all the time when running the std's spec.
    In any case, the program will run and the warning will be seen.
    Ary Borenszweig committed Jan 6, 2017
    Copy the full SHA
    78a5a14 View commit details
  2. Updated Changelog

    Ary Borenszweig committed Jan 6, 2017
    Copy the full SHA
    d1f8c42 View commit details
Showing with 4 additions and 3 deletions.
  1. +2 −1 CHANGELOG.md
  2. +2 −2 src/benchmark.cr
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Next
# 0.20.4 (06-01-2017)

* **(breaking change)** A type that wants to convert itself to JSON now must override `to_json(builder : JSON::Builder)` instead of `to_json(io : IO)`. The same is true for custom JSON converters. If you are using `JSON.mapping` then your code will continue to work without changes.
* **(breaking change)** Defining a `finalize` method on a struct now gives a compile error
* **(breaking change)** Default argument types now must match their restriction, if any (for example `def foo(x : Int32 = nil)` will now fail to compile if `foo` is invoked without arguments) (thanks @MakeNowJust)
* **(breaking change)** `each` methods now return `Nil`
* **(breaking change)** `IO#skip(bytes)` will now raise if there aren't at least the given amount of bytes in the `IO` (previously it would work well if there were less bytes, and it would hang if there were more)
* **(breaking change)** `MemoryIO` was removed (use `IO::Memory` instead)
4 changes: 2 additions & 2 deletions src/benchmark.cr
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ module Benchmark
# one can report the benchmarks. See the module's description.
def bm
{% if !flag?(:release) %}
{{ puts "Warning: benchmarking without the `--release` flag won't yield useful results".id }}
puts "Warning: benchmarking without the `--release` flag won't yield useful results"
{% end %}

report = BM::Job.new
@@ -101,7 +101,7 @@ module Benchmark
# displayed and updated as they are calculated, otherwise all at once.
def ips(calculation = 5, warmup = 2, interactive = STDOUT.tty?)
{% if !flag?(:release) %}
{{ puts "Warning: benchmarking without the `--release` flag won't yield useful results".id }}
puts "Warning: benchmarking without the `--release` flag won't yield useful results"
{% end %}

job = IPS::Job.new(calculation, warmup, interactive)