Skip to content

Commit

Permalink
Merge pull request #2773 from chaadow/patch-1
Browse files Browse the repository at this point in the history
Remove use of deprecated mb_chars method
  • Loading branch information
mshibuya authored Jan 11, 2025
2 parents b4d43c3 + 3139628 commit 08a3698
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/carrierwave/sanitized_file.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'pathname'
require 'active_support/core_ext/string/multibyte'
require 'marcel'

module CarrierWave
Expand Down Expand Up @@ -312,7 +311,7 @@ def sanitize(name)
name = name.gsub(sanitize_regexp, "_")
name = "_#{name}" if name =~ /\A\.+\z/
name = "unnamed" if name.size.zero?
name.mb_chars.to_s
name.to_s
end

def declared_content_type
Expand Down

0 comments on commit 08a3698

Please sign in to comment.