Ruby: &[SPACE][identifier] syntax breaks Ruby parsing
- Ngôn ngữ chính
- CodeQL
- Star
- 10.1k
- Fork
- 2.1k
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 141
Mô tả
CodeQL's Ruby breaks parsing breaks for the following code:
```ruby
sorted_array = array.sort(& custom_sorts[params[:sortby]])
```
I understand that the following *should* be how this is written, but sometimes people put weird syntax in and it shouldn't break a whole file being parsed:
```ruby
sorted_array = array.sort(&custom_sorts[params[:sortby]])
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by reproducing the Ruby parser failure with the two sort examples in the issue, focusing on the space between `&` and the identifier. Trace the parser entry point that handles this syntax and verify that both forms are accepted without preventing the rest of the file from being parsed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ruby
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100