rubygems/rubygems — pull request #380 by headius (2012-09-28 22:39:56+00:00)
Title: Fix error on creating a Version object with a frozen string.

The logic for Version#initialize stores the to_s of the incoming value and then attempts to strip! that value in-place. This is broken for two reasons:

* It cannot accept frozen strings; an error results.
* It modifies the original string.

Note that String#to_s returns the same string, not a copy, so the dup is necessary to ensure we have our own copy of the string.