This project is closed and read-only.
Actions
Backport #7157
closedRuby ignores Kernel#gsub block
Backport #7157:
Ruby ignores Kernel#gsub block
Status:
Closed
Assignee:
Description
When working with command line and use Kernel#gsub, ruby ignores the block if given.
Reproduce code:
Test text file:
File name:
test
File Content:
test
Test Command line input:
ruby -pe 'gsub(/t([a-z])s/){"d"+$1.capitalize}' test
Expected output:
dEt
Actual output:
Actions