Skip to content

Commit 5045d99

Browse files
committed
docs: add array shorthand syntax T[] documentation and changelog
- Update arrays-and-hashes docs with `String[]` syntax examples (en, ja, ko) - Update built-in-generics with array shorthand examples - Add v0.0.43 to changelog with array shorthand feature - Update cheatsheet with new syntax - Update optional-rest-parameters examples - Both `String[]` and `Array<String>` syntaxes are documented
1 parent f51aa44 commit 5045d99

File tree

13 files changed

+424
-382
lines changed

13 files changed

+424
-382
lines changed

docs/learn/basics/basic-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ speed_of_light: Float = 2.998e8 # 299,800,000
175175
### Float Arithmetic
176176

177177
```trb title="float_math.trb"
178-
def calculate_average(values: Array<Float>): Float
178+
def calculate_average(values: Float[]): Float
179179
sum = 0.0
180180
values.each do |v|
181181
sum += v

0 commit comments

Comments
 (0)