pashamur/ruby-extract-method — pull request #3 by maveonair (2014-01-12 15:23:18+00:00)
Title: Sublime Text 3 Support

Great plugin but unfortunately it doesn't work with Sublime Text 3:

```python
self.view.replace(self.edit, region, method_name)
File "/Applications/Sublime Text.app/Contents/MacOS/sublime.py", line 588, in replace
raise ValueError("Edit objects may not be used after the TextCommand's run method has returned")
ValueError: Edit objects may not be used after the TextCommand's run method has returned
```

I came up with this solution borrowed from https://github.com/SublimeText/Tag/issues/45 and it works fine for me on ST3.

Changes:
+ Use Edit.py for text replacement
+ Remove ```string.expandtabs``` because of ```AttributeError: 'module' object has no attribute 'expandtabs'``` under ST3.