Tom Hvitved
007ab2b7ce
Ruby: Do not expose AST layer through ruby.qll
2022-09-13 19:59:56 +02:00
Arthur Baars
f77c2ac3d0
Update tests
2022-08-25 17:40:52 +02:00
Arthur Baars
59773eb743
Ruby: update tree-sitter grammar
2022-08-25 17:21:29 +02:00
Nick Rolfe
94a51142d0
Ruby: fix typo in internal predicate name
2022-08-17 11:05:39 +01:00
Arthur Baars
d8592a2b05
Ruby: PrintAST: more stable order for synthesized nodes
2022-08-03 09:02:38 +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
Harry Maclean
5f17d8370c
Ruby: Small change to isArrayExpr
2022-07-13 18:20:14 +12:00
Harry Maclean
63dcce9a31
Ruby: Refactor isArrayConstant
2022-07-13 18:20:14 +12:00
Arthur Baars
c5d3df087d
Update tree-sitter-embeded-template
2022-06-20 17:04:27 +02:00
Arthur Baars
29ea1b2f24
Ruby: rename getSelfVariableAccess to getReceiver
2022-05-23 11:30:29 +02:00
Arthur Baars
68aeb2ba85
Update test output
2022-05-20 16:30:58 +02: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
c9f7568ca3
Ruby: add Call::isSafeNavigation
2022-05-11 12:06:08 +02:00
Arthur Baars
907c3db5ca
Address comments
...
Co-authored-by: Nick Rolfe <nickrolfe@github.com >
2022-05-11 09:59:42 +02:00
Arthur Baars
d055f9a186
Update tests
2022-04-28 13:47:10 +02:00
Arthur Baars
7359ffaa2e
Ruby: add tree-sitter test case
2022-04-28 12:59:56 +02:00
Nick Rolfe
a9eac19dac
Ruby: address review feedback
2022-03-28 11:19:24 +01:00
Nick Rolfe
034fce0682
Ruby: show constant value type in tests
2022-03-25 08:25:07 +00:00
Nick Rolfe
0613fda57f
Ruby: separate constant propagation of regexps from strings
2022-03-24 17:46:58 +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
Arthur Baars
496aab78a7
Merge pull request #8535 from aibaars/setter-method-arg-location
...
Ruby: fix location of setter-call argument
2022-03-24 11:26:13 +01:00
Harry Maclean
28a430a2f2
Ruby: Fix bad name of lambda in test
...
This isn't the identity function, so it's confusing for it to be named
so.
2022-03-24 12:44:41 +13:00
Arthur Baars
06a99c3987
Ruby: fix location of setter-call argument
2022-03-23 12:55:52 +01:00
Tom Hvitved
99ddfb489f
Ruby: Rework getConstantValue implementation
2022-03-22 10:07:44 +01:00
Harry Maclean
99b5c580a5
Ruby: Fix captured reads in lambdas
...
These were previously identified as method calls. The fix is to
recognise lambdas as a scope which can inherit variables from its
parent.
2022-03-22 15:35:43 +13: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
a39aed52c6
Ruby: add more tests for edge cases in parsing of integers
2022-03-14 15:45:57 +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
Tom Hvitved
1e1b2e284d
Ruby: Cleanup flow through self
2022-03-09 13:17:11 +01:00
Arthur Baars
69ed121ecb
Ruby/Python: regex parser: group sequences of 'normal' characters
2022-02-22 16:15:33 +01:00
Arthur Baars
6525035f0a
Address comments
2022-02-03 13:47:03 +01: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
3e2ca61c01
Ruby: support anonymous block parameters/arguments
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
dd27ed8392
Ruby: Desugar hash literals
...
```rb
{ a: 1, **splat, b: 2 }
```
becomes
```rb
::Hash.[](a: 1, **splat, b: 2)
```
2022-01-26 13:53:18 +01:00
Arthur Baars
948ebe4b4c
Merge pull request #7568 from aibaars/ruby-pattern-matching-taint
...
Ruby: taint steps for pattern matches
2022-01-26 10:27:47 +01:00
Tom Hvitved
2a972dc045
Address review comments
2022-01-24 14:27:42 +01:00
Arthur Baars
7630b277b8
Ruby: update AST and CFG test data
2022-01-24 10:31:08 +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