nellshamrell / snake_to_camel_case

7 stars 3 forks source link

RubyConf 2013 challenge #5

Open ghost opened 10 years ago

ghost commented 10 years ago

Came up with two:

(\A\w|(?<=_)\w)

(^\D|(?<=_)\D)

A couple questions: Is there a preferred method from a benchmarking standpoint? Is there any other way to find the underscore within_a_variable?

Also, I can't remember the combinations offhand, but when I tested some combinations in Rspec vs. Rubular, it gave different results. On one occasion, Rspec failed, Rubular worked.