Created
January 15, 2013 15:49
-
-
Save user454322/4539611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bad_names=["threadList","handleSuspend","handleDisturb","handleDisturbAction","handleFollowParent","handleFollowChild","handleDisturbSession","handleResume","handleStatus","setBreakPoint","deleteBreakPoint","handleBreak","handleBreak","handleClear","setCommonBreakPoint","handleCommonBreak","handleContinue","handlePrint","handleExec","handleUp","handleDown","handleUp","handleStep","handleNext","handleReturn","handleWhere"] | |
bad_names.each{|name| | |
good = String.new(name) | |
name.split("").each{|charr| | |
if(charr =~ /[A-Z]/) | |
good.gsub!(charr,"_"+charr.downcase) | |
end | |
} | |
cmd = "find ./ -name '*.rb' -print0 | xargs -0 sed -i 's/#{name}/#{good}/g'" | |
puts cmd | |
Kernel.system(cmd) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change camelCase (Java style) to underscore (Ruby style)