Moving from lambda { |param| ... } to ->(param) { ... } Find What: lambda\s*\{\s*\|(\w+,*\s*\w+)\| Replace With: ->($1) { Wrapping scopes with lambdas Find What: scope\s:(\w+),\s(\w+.+) Replace With: scope :$1, -> { $2 }