Skip to content

Commit 0170745

Browse files
committed
No need to use blank? here
This file is required when `active_support` is required. That should avoid to load core_ext if possible, so if there is no good reason to use the blank core_ext, better to not use it.
1 parent 159ce69 commit 0170745

File tree

1 file changed

+1
-2
lines changed
  • activesupport/lib/active_support/inflector

1 file changed

+1
-2
lines changed

activesupport/lib/active_support/inflector/methods.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require "active_support/inflections"
4-
require "active_support/core_ext/object/blank"
54

65
module ActiveSupport
76
# The Inflector transforms words from singular to plural, class names to table
@@ -347,7 +346,7 @@ def ordinalize(number)
347346
def const_regexp(camel_cased_word)
348347
parts = camel_cased_word.split("::")
349348

350-
return Regexp.escape(camel_cased_word) if parts.blank?
349+
return Regexp.escape(camel_cased_word) if parts.empty?
351350

352351
last = parts.pop
353352

0 commit comments

Comments
 (0)