Skip to content

Commit b327e39

Browse files
committed
Bump to version 0.9.0
1 parent 175b5be commit b327e39

File tree

8 files changed

+42
-9
lines changed

8 files changed

+42
-9
lines changed

CHANGELOG.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [0.9.0] - 2023-08-25
10+
11+
### Added
12+
13+
- Regular expressions can now be bound by `\n`, `\r`, and a combination of `\r\n`.
14+
- Strings delimited by `%`, `%q`, and `%Q` can now be bound by `\n`, `\r`, and a combination of `\r\n`.
15+
- `IntegerNode#value` now returns the value of the integer as a Ruby `Integer`.
16+
- `FloatNode#value` now returns the value of the float as a Ruby `Float`.
17+
- `RationalNode#value` now returns the value of the rational as a Ruby `Rational`.
18+
- `ImaginaryNode#value` now returns the value of the imaginary as a Ruby `Complex`.
19+
- `ClassNode#name` is now a string that returns the name of just the class, without the namespace.
20+
- `ModuleNode#name` is now a string that returns the name of just the module, without the namespace.
21+
- Regular expressions and strings found after a heredoc declaration but before the heredoc body are now parsed correctly.
22+
- The serialization API now supports shared strings, which should help reduce the size of the serialized AST.
23+
- `*Node#copy` is introduced, which returns a copy of the node with the given overrides.
24+
- `Location#copy` is introduced, which returns a copy of the location with the given overrides.
25+
- `DesugarVisitor` is introduced, which provides a simpler AST for use in tools that want to process fewer node types.
26+
- `{ClassVariable,Constant,ConstantPath,GlobalVariable,InstanceVariable,LocalVariable}TargetNode` are introduced. These nodes represent the target of writes in locations where a value cannot be provided, like a multi write or a rescue reference.
27+
- `UntilNode#closing_loc` and `WhileNode#closing_loc` are now provided.
28+
- `Location#join` is now provided, which joins two locations together.
29+
- `YARP::parse_lex` and `YARP::parse_lex_file` are introduced to parse and lex in one result.
30+
31+
### Changed
32+
33+
- When there is a magic encoding comment, the encoding of the first token's source string is now properly reencoded.
34+
- Constants followed by unary `&` are now properly parsed as a call with a passed block argument.
35+
- Escaping multi-byte characters in a string literal will now properly escape the entire character.
36+
- `YARP.lex_compat` now has more accurate behavior when a byte-order mark is present in the file.
37+
- **BREAKING**: `AndWriteNode`, `OrWriteNode`, and `OperatorWriteNode` have been split back up into their `0.7.0` versions.
38+
- We now properly support spaces between the `encoding` and `=`/`:` in a magic encoding comment.
39+
- We now properly parse `-> foo: bar do end`.
40+
941
## [0.8.0] - 2023-08-18
1042

1143
### Added
@@ -49,7 +81,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
4981

5082
- 🎉 Initial release! 🎉
5183

52-
[unreleased]: https://github.com/ruby/yarp/compare/v0.8.0...HEAD
84+
[unreleased]: https://github.com/ruby/yarp/compare/v0.9.0...HEAD
85+
[0.9.0]: https://github.com/ruby/yarp/compare/v0.8.0...v0.9.0
5386
[0.8.0]: https://github.com/ruby/yarp/compare/v0.7.0...v0.8.0
5487
[0.7.0]: https://github.com/ruby/yarp/compare/v0.6.0...v0.7.0
5588
[0.6.0]: https://github.com/ruby/yarp/compare/d60531...v0.6.0

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
yarp (0.8.0)
4+
yarp (0.9.0)
55

66
GEM
77
remote: https://rubygems.org/

ext/yarp/extension.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef YARP_EXT_NODE_H
22
#define YARP_EXT_NODE_H
33

4-
#define EXPECTED_YARP_VERSION "0.8.0"
4+
#define EXPECTED_YARP_VERSION "0.9.0"
55

66
#include <ruby.h>
77
#include <ruby/encoding.h>

include/yarp/version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#define YP_VERSION_MAJOR 0
2-
#define YP_VERSION_MINOR 8
2+
#define YP_VERSION_MINOR 9
33
#define YP_VERSION_PATCH 0
4-
#define YP_VERSION "0.8.0"
4+
#define YP_VERSION "0.9.0"

rust/yarp-sys/tests/utils_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn version_test() {
1212
CStr::from_ptr(version)
1313
};
1414

15-
assert_eq!(&cstring.to_string_lossy(), "0.8.0");
15+
assert_eq!(&cstring.to_string_lossy(), "0.9.0");
1616
}
1717

1818
#[test]

templates/java/org/yarp/Loader.java.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public class Loader {
6060
expect((byte) 'P');
6161

6262
expect((byte) 0);
63-
expect((byte) 8);
63+
expect((byte) 9);
6464
expect((byte) 0);
6565

6666
// This loads the name of the encoding. We don't actually do anything

templates/lib/yarp/serialize.rb.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ end
1414
module YARP
1515
module Serialize
1616
MAJOR_VERSION = 0
17-
MINOR_VERSION = 8
17+
MINOR_VERSION = 9
1818
PATCH_VERSION = 0
1919

2020
def self.load(input, serialized)

yarp.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Gem::Specification.new do |spec|
44
spec.name = "yarp"
5-
spec.version = "0.8.0"
5+
spec.version = "0.9.0"
66
spec.authors = ["Shopify"]
77
spec.email = ["ruby@shopify.com"]
88

0 commit comments

Comments
 (0)