operation(a: 1) { |s| s.to_i } becomes operation(a: 1)(&:to_i) which is invalid ruby
See original GitHub issueMetadata
- Ruby version: ruby 2.7.0dev (2019-03-18 trunk 67296) [x86_64-darwin17]
- @prettier/plugin-ruby version: 0.10.0
Input
operation(a: 1) { |s| s.to_i }
Current output
operation(a: 1)(&:to_i)
Expected output
operation(a: 1, &:to_i)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
String manipulation challenge - ruby
Let's begin by constucting a method that computes the weight of each string. def weight(s) base = 'a'.ord - 1 s.each_char.
Read more >Solving "invalid byte sequence in UTF-8" errors in ruby
Every character in UTF-8 is a sequence of 1 up to 4 bytes. ... So, the following operation will result in the infamous...
Read more >Active Record Validations and Callbacks
If any validations fail, the object will be marked as invalid and Active Record will not perform the INSERT or UPDATE operation. This...
Read more >FES re operation of facility.
Erie, via a submerged jet, will be heated no more than 20*F above the ambient lake water temperature. Although some small fish and...
Read more >qandamaster471.xml
... -s-equvalen-aly-braic-expression-involving-sin-2-co5x-1-positive-q30511196 0.8 ... https://www.chegg.com/homework-help/questions-and-answers/operating- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll take a crack at it 😃
Yup - thanks. Will get this fixed. If anyone’s looking for a contribution, the toProcTransform function needs to be moved up the AST to be at the arguments level and not the individual block level.