Skip to content


Browse files Browse the repository at this point in the history
Implement encoding optional argument
  • Loading branch information
tak1n committed Jan 21, 2016
1 parent 57d8550 commit 2fa07b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion kernel/common/string.rb
Expand Up @@ -42,8 +42,9 @@ def clone
alias_method :dup, :clone

def initialize(arg = undefined)
def initialize(arg = undefined, encoding: nil)
replace arg unless undefined.equal?(arg)
self.force_encoding(encoding) if encoding

Expand Down
1 change: 0 additions & 1 deletion spec/tags/ruby/core/string/new_tags.txt

This file was deleted.

0 comments on commit 2fa07b5

Please sign in to comment.