Skip to content

Releases: crystal-lang/crystal

0.5.3

06 Nov 21:57
Compare
Choose a tag to compare
  • Spec: when a should or should_not fail, the filename and line number, including the source's line, is included in the error message.
  • Spec: added -l switch to be able to run a spec defined in a line.
  • Added crystal spec file:line
  • Properties (property, setter, getter) can now be restricted to a type with the syntax property name :: Type.
  • Enums can be used outside lib. They inherit Enum, can have methods and can be marked with @[Flags].
  • Removed the distinction between lib enums and regular enums.
  • Fixed: it was incorrectly possible to define class, def, etc. inside a call block.
  • The syntax for specifying the base type of an enum, enum Name < BaseType has been deprecated. Use enum Name : BaseType.
  • Added Array#<=> and make it comparable to other arrays.

0.5.2

04 Nov 22:20
@waj waj
Compare
Choose a tag to compare
  • New command line interface to the compiler (crystal build ..., crystal run ..., crystal spec, etc.). The default is to compiler and run a program.
  • crystal eval without arguments reads from standard input.
  • Added preliminar crystal deps command.
  • __FILE__, __DIR__ and __LINE__, when used as def default arguments, resolve to the caller location (similar to D and Swift)
  • Allow as to determine a type even if the casted value doesn't have a type yet.
  • Added is_a? in macros. The check is against an AST node name. For example node.is_a?(HashLiteral).
  • Added emit_null property to json_mapping.
  • Added converter property to json_mapping.
  • Added pp in macros.
  • Added to_pretty_json.
  • Added really basic CSV.parse.
  • Added Regex.escape.
  • Added String#scan.
  • Added -e switch to spec, to run specs that match a pattern.
  • Added --fail-fast swtich to spec.
  • Added HTTPClient#basic_auth.
  • Added DeclareVar, Def and Arg macro methods.
  • Added Time and TimeSpan structs. TimeWithZone will come later.
  • Added Array#fill (thanks @exilor).
  • Added Array#uniq.
  • Optimized File.read_lines.
  • Allow any expression inside {% ... %} so that you can intepret code without outputting the result.
  • Allow \ at the end of a line.
  • Allow using if and unless inside macro expressions.
  • Allow marking a fun/def as @[Raises] (useful when a function can potentially raise from a callback).
  • Allow procs are now considered @[Raises].
  • OAuth2::Client supports getting an access token via authorization code or refresh token.
  • Consecutive string literals are automatically concatenated by the parser as long as there is a \ with a newline between them.
  • Many bug fixes.

0.5.1

16 Oct 22:25
@waj waj
Compare
Choose a tag to compare
  • Added json_mapping macro.
  • Added Signal module.
  • Added Tempfile class.
  • Enhanced HTTP::Client.
  • Added OAuth::Consumer.
  • Added OAuth2::Client.
  • Added OpenSSL::HMAC.
  • Added SecureRandom.
  • New syntax for array/hash-like classes. For example: Set {1, 2, 3} and HTTP::Headers {"content-type": "text/plain"}. These just create the type and use << or []=.
  • Optimized Json parsing performance.
  • Added a CSV builder.
  • XML reader can parse from an IO.
  • Added Dir::glob and Dir::Entries (thanks @jhass)
  • Allow ensure as an expression suffix.
  • Fixed #219: Proc type is not inferred when passing to library fun and the return type doesn't match.
  • Fixed #224: Class#new doesn't pass a block.
  • Fixed #225: ICE when comparing void to something.
  • Fixed #227: Nested captured block looses scope and crashes compiler.
  • Fixed #228: Macro expansion doesn't retain symbol escaping as needed.
  • Fixed #229: Can't change block context if defined within module context.
  • Fixed #230: Type interference breaks equality operator.
  • Fixed #233: Incorrect no block given message with new.
  • Other bug fixes.

0.5.0

28 Sep 07:37
@waj waj
Compare
Choose a tag to compare