Tom Hvitved
65a11984bd
Ruby: Synthesize implicit super arguments
2025-04-03 09:13:06 +02:00
Tom Hvitved
c10b5801b1
Ruby: Add argument-less super call tests
2025-04-03 09:12:23 +02:00
Tom Hvitved
e42de3de6f
Ruby: Fix extraction errors
2024-06-04 14:54:02 +02:00
Arthur Baars
20022b6f3a
Add test case
2024-01-05 14:39:30 +01:00
Tom Hvitved
e96cbeb00a
Ruby: Adjust locations of synthesized nodes
2023-08-14 14:37:47 +02:00
Tom Hvitved
77fca277fe
Ruby: Improve desugaring of for loops
2023-08-10 13:22:01 +02:00
Arthur Baars
a819797508
Ruby: add test case of destructured assignment with contants
2023-03-24 16:57:39 +01:00
Arthur Baars
f391948b53
Ruby: update expected output
2023-02-06 10:17:19 +01:00
Arthur Baars
3c15fd266d
Ruby: add one-line pattern match test
2023-02-06 10:17:19 +01:00
Arthur Baars
46063c7d04
Ruby: update expected output
2023-01-13 10:22:41 +01:00
Arthur Baars
b3855b089a
Ruby: some more tests
2022-10-22 14:15:29 +02:00
Arthur Baars
ccaa12998d
Ruby: desugar compound constant-assignments
2022-10-22 01:11:35 +02:00
Asger F
d26b0892cf
Ruby: also add an AST test
2022-10-21 09:23:21 +02:00
Arthur Baars
f77c2ac3d0
Update tests
2022-08-25 17:40:52 +02:00
Arthur Baars
7be106d7bb
Ruby: handle magic coding: comments
2022-07-21 16:33:18 +02:00
Harry Maclean
1fa2144716
Ruby: Update test fixtures
2022-07-13 21:02:08 +12:00
Arthur Baars
dbd9c1859d
Add more test cases for &. operator
2022-05-11 12:06:08 +02:00
Arthur Baars
76f806159c
Ruby: desugar safe navigation calls
2022-05-11 12:06:08 +02:00
Arthur Baars
d055f9a186
Update tests
2022-04-28 13:47:10 +02:00
Nick Rolfe
034fce0682
Ruby: show constant value type in tests
2022-03-25 08:25:07 +00:00
Tom Hvitved
e12b6df118
Merge pull request #8484 from hvitved/ruby/constant-value-rework
...
Ruby: Rework `getConstantValue` implementation
2022-03-24 14:32:31 +01:00
Tom Hvitved
99ddfb489f
Ruby: Rework getConstantValue implementation
2022-03-22 10:07:44 +01:00
Harry Maclean
c891e62a0e
Ruby: Add some tests for method calls in lambdas
...
This reveals a bug where we identify reads of captured variables in
lambdas as method calls. This is fixed in a followup commit.
2022-03-22 15:33:22 +13:00
Nick Rolfe
94ce578ea4
Ruby: implement getComponent(n) for simple and hash-key symbols
2022-03-16 11:43:46 +00:00
Nick Rolfe
76918238f0
Ruby: test ExprCfgNode::getConstantValue()
2022-03-16 11:21:57 +00:00
Nick Rolfe
488c8ef609
Ruby: accept test changes after adding more literals
2022-03-14 15:49:22 +00:00
Nick Rolfe
6c5868cfb5
Ruby: use NumberUtils in parseInteger
...
And make parse{Binary,Octal,Hex}Int hold only for values in the range
0 to 2^31-1 (incl.)
2022-03-14 15:45:57 +00:00
Nick Rolfe
6bd9616c6e
Ruby: interpret string escape sequences in getConstantValue()
2022-03-14 15:45:57 +00:00
Arthur Baars
abf3ce6223
Ruby: expressions in pin operator ^
2022-01-28 19:47:31 +01:00
Arthur Baars
00fb4d3776
Ruby: Values in Hash literals and keyword arguments can be omitted
2022-01-28 19:47:31 +01:00
Arthur Baars
b9258e78ca
Ruby: non-local variables in variable reference pattern
2022-01-28 19:47:31 +01:00
Tom Hvitved
2a972dc045
Address review comments
2022-01-24 14:27:42 +01:00
Tom Hvitved
85e1cda81b
Ruby: Distinguish symbols from strings in ConstantValue
2022-01-21 19:16:12 +01:00
Tom Hvitved
aa9cfebc65
Ruby: Replace getValueText with getConstantValue
2022-01-21 09:19:19 +01:00
Harry Maclean
4f7f92490a
Distinguish regex components from strings
...
Create a set of classes for components of regex literals,
separate from those of string literals. This allows us to special-case
components of free-spacing regexes (ones with the /x flag) to not have a
`getValueText()`.
This in turn is useful because our regex parser can't handle free-spacing
regexes, so excluding them ensures that we don't generate erroneous
ReDoS alerts.
2022-01-19 11:23:40 +13:00
Tom Hvitved
c3fd272f9b
Ruby: Simplify getValueText logic for StringlikeLiterals
2022-01-06 12:27:03 +13:00
Tom Hvitved
301d0bbdf8
Ruby: Restructure test to avoid dead code
2022-01-06 12:27:03 +13:00
Harry Maclean
32c93e70e2
Include simple interpolations in getValueText
...
When calculating `StringlikeLiteral.getValueText`, include results from
interpolations where we can determine their string value. For example:
b = "b" # local variable
D = "d" # constant
"a#{b}c" # getValueText() = "abc"
"a#{b}c{D}" # getValueText() = "abcd"
/#a#{b}c{D}/ # getValueText() = "abcd"
2022-01-06 12:27:03 +13:00
Harry Maclean
3df3fb092b
Make room for new test code
...
This change is split over several commits so it is easier to see.
This change adds some extra lines, which will be populated in the next
commit.
2022-01-06 12:26:51 +13:00
Jeff Gran
f21398ce84
changed the name of one of the constants for a better test case
2021-12-22 08:42:07 -07:00
Jeff Gran
445c420a3d
rerun test --learn with rebuilt ruby extractor
2021-12-22 08:42:04 -07:00
Jeff Gran
07c7de5cfd
run test --learn, add a few more constants to constant.rb test case
2021-12-22 08:36:07 -07:00
Arthur Baars
d17c055139
CFG
2021-12-09 15:23:25 +01:00
Arthur Baars
44a615839d
Add test case with rest variable and no prefix elements
2021-12-09 15:23:25 +01:00
Arthur Baars
51998294ad
Ruby: add AST classes for parenthesized patterns
2021-12-03 18:13:53 +01:00
Arthur Baars
16e1e97ff0
Add test data for case-in expressions
2021-11-25 13:25:33 +01:00
Tom Hvitved
945bb7459a
Ruby: Update expected test output
2021-11-17 09:05:37 +01:00
Alex Ford
8603609698
Update test output to account for for-loop -> each desugaring
2021-11-17 09:05:36 +01:00
Arthur Baars
976daddd36
Move files to ruby subfolder
2021-10-15 11:47:28 +02:00