Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
253ddeb3
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
253ddeb3
编写于
10月 08, 2016
作者:
M
Matthew Draper
提交者:
GitHub
10月 08, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #26732 from matthewd/fixnum-warning
Fixnum and Bignum are deprecated in Ruby trunk
上级
fb4dc322
cb0452e9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
8 deletion
+8
-8
activejob/lib/active_job/arguments.rb
activejob/lib/active_job/arguments.rb
+2
-2
activerecord/test/cases/query_cache_test.rb
activerecord/test/cases/query_cache_test.rb
+1
-1
activesupport/lib/active_support/core_ext/numeric/conversions.rb
...upport/lib/active_support/core_ext/numeric/conversions.rb
+1
-1
activesupport/lib/active_support/xml_mini.rb
activesupport/lib/active_support/xml_mini.rb
+2
-2
activesupport/test/core_ext/array/grouping_test.rb
activesupport/test/core_ext/array/grouping_test.rb
+2
-2
未找到文件。
activejob/lib/active_job/arguments.rb
浏览文件 @
253ddeb3
...
...
@@ -34,8 +34,8 @@ class SerializationError < ArgumentError; end
module
Arguments
extend
self
# :nodoc:
# Calls #uniq since Integer, Fixnum, and Bignum are all the same class on Ruby 2.4+
TYPE_WHITELIST
=
[
NilClass
,
String
,
Integer
,
Fixnum
,
Bignum
,
Float
,
BigDecimal
,
TrueClass
,
FalseClass
].
uniq
TYPE_WHITELIST
=
[
NilClass
,
String
,
Integer
,
Float
,
BigDecimal
,
TrueClass
,
FalseClass
]
TYPE_WHITELIST
.
push
(
Fixnum
,
Bignum
)
unless
1
.
class
==
Integer
# Serializes a set of arguments. Whitelisted types are returned
# as-is. Arrays/Hashes are serialized element by element.
...
...
activerecord/test/cases/query_cache_test.rb
浏览文件 @
253ddeb3
...
...
@@ -138,7 +138,7 @@ def test_cache_does_not_wrap_string_results_in_arrays
assert_kind_of
Numeric
,
Task
.
connection
.
select_value
(
"SELECT count(*) AS count_all FROM tasks"
)
elsif
current_adapter?
(
:SQLite3Adapter
,
:Mysql2Adapter
,
:PostgreSQLAdapter
)
# Future versions of the sqlite3 adapter will return numeric
assert_instance_of
Fixnum
,
Task
.
connection
.
select_value
(
"SELECT count(*) AS count_all FROM tasks"
)
assert_instance_of
0
.
class
,
Task
.
connection
.
select_value
(
"SELECT count(*) AS count_all FROM tasks"
)
else
assert_instance_of
String
,
Task
.
connection
.
select_value
(
"SELECT count(*) AS count_all FROM tasks"
)
end
...
...
activesupport/lib/active_support/core_ext/numeric/conversions.rb
浏览文件 @
253ddeb3
...
...
@@ -134,7 +134,7 @@ def to_formatted_s(*args)
end
# Ruby 2.4+ unifies Fixnum & Bignum into Integer.
if
Integer
==
Fixnum
if
0
.
class
==
Integer
Integer
.
prepend
ActiveSupport
::
NumericWithFormat
else
Fixnum
.
prepend
ActiveSupport
::
NumericWithFormat
...
...
activesupport/lib/active_support/xml_mini.rb
浏览文件 @
253ddeb3
...
...
@@ -48,8 +48,8 @@ def content_type
}
# No need to map these on Ruby 2.4+
TYPE_NAMES
[
"Fixnum"
]
=
"integer"
unless
Fixnum
==
Integer
TYPE_NAMES
[
"Bignum"
]
=
"integer"
unless
Bignum
==
Integer
TYPE_NAMES
[
"Fixnum"
]
=
"integer"
unless
0
.
class
==
Integer
TYPE_NAMES
[
"Bignum"
]
=
"integer"
unless
0
.
class
==
Integer
end
FORMATTING
=
{
...
...
activesupport/test/core_ext/array/grouping_test.rb
浏览文件 @
253ddeb3
...
...
@@ -4,11 +4,11 @@
class
GroupingTest
<
ActiveSupport
::
TestCase
def
setup
# In Ruby < 2.4, test we avoid Integer#/ (redefined by mathn)
Fixnum
.
send
:private
,
:/
unless
Fixnum
==
Integer
Fixnum
.
send
:private
,
:/
unless
0
.
class
==
Integer
end
def
teardown
Fixnum
.
send
:public
,
:/
unless
Fixnum
==
Integer
Fixnum
.
send
:public
,
:/
unless
0
.
class
==
Integer
end
def
test_in_groups_of_with_perfect_fit
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录