Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
414008f9
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,发现更多精彩内容 >>
提交
414008f9
编写于
7月 18, 2012
作者:
K
kennyj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix class_eval without __FILE__ and __LINE__.
上级
15bfaa3d
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
6 addition
and
6 deletion
+6
-6
actionpack/lib/action_dispatch/routing/route_set.rb
actionpack/lib/action_dispatch/routing/route_set.rb
+1
-1
activerecord/test/cases/associations/has_many_associations_test.rb
...ord/test/cases/associations/has_many_associations_test.rb
+2
-2
activerecord/test/cases/attribute_methods_test.rb
activerecord/test/cases/attribute_methods_test.rb
+1
-1
activesupport/test/multibyte_chars_test.rb
activesupport/test/multibyte_chars_test.rb
+1
-1
railties/test/generators_test.rb
railties/test/generators_test.rb
+1
-1
未找到文件。
actionpack/lib/action_dispatch/routing/route_set.rb
浏览文件 @
414008f9
...
...
@@ -333,7 +333,7 @@ def define_mounted_helper(name)
end
end
MountedHelpers
.
class_eval
<<-
RUBY
MountedHelpers
.
class_eval
(
<<-
RUBY
,
__FILE__
,
__LINE__
+
1
)
def
#{
name
}
@
#{
name
}
||= _
#{
name
}
end
...
...
activerecord/test/cases/associations/has_many_associations_test.rb
浏览文件 @
414008f9
...
...
@@ -1467,7 +1467,7 @@ def test_creating_using_primary_key
def
test_defining_has_many_association_with_delete_all_dependency_lazily_evaluates_target_class
ActiveRecord
::
Reflection
::
AssociationReflection
.
any_instance
.
expects
(
:class_name
).
never
class_eval
<<-
EOF
class_eval
(
<<-
EOF
,
__FILE__
,
__LINE__
+
1
)
class DeleteAllModel < ActiveRecord::Base
has_many :nonentities, :dependent => :delete_all
end
...
...
@@ -1476,7 +1476,7 @@ class DeleteAllModel < ActiveRecord::Base
def
test_defining_has_many_association_with_nullify_dependency_lazily_evaluates_target_class
ActiveRecord
::
Reflection
::
AssociationReflection
.
any_instance
.
expects
(
:class_name
).
never
class_eval
<<-
EOF
class_eval
(
<<-
EOF
,
__FILE__
,
__LINE__
+
1
)
class NullifyModel < ActiveRecord::Base
has_many :nonentities, :dependent => :nullify
end
...
...
activerecord/test/cases/attribute_methods_test.rb
浏览文件 @
414008f9
...
...
@@ -816,7 +816,7 @@ def in_time_zone(zone)
end
def
privatize
(
method_signature
)
@target
.
class_eval
<<-
private_method
@target
.
class_eval
(
<<-
private_method
,
__FILE__
,
__LINE__
+
1
)
private
def
#{
method_signature
}
"I'm private"
...
...
activesupport/test/multibyte_chars_test.rb
浏览文件 @
414008f9
...
...
@@ -110,7 +110,7 @@ def test_split_should_return_an_array_of_chars_instances
end
%w{capitalize downcase lstrip reverse rstrip swapcase upcase}
.
each
do
|
method
|
class_eval
(
<<-
EOTESTS
)
class_eval
(
<<-
EOTESTS
,
__FILE__
,
__LINE__
+
1
)
def test_
#{
method
}
_bang_should_return_self_when_modifying_wrapped_string
chars = ' él piDió Un bUen café '
assert_equal chars.object_id, chars.send("
#{
method
}
!").object_id
...
...
railties/test/generators_test.rb
浏览文件 @
414008f9
...
...
@@ -167,7 +167,7 @@ def test_nested_fallbacks_for_generators
def
test_developer_options_are_overwriten_by_user_options
Rails
::
Generators
.
options
[
:with_options
]
=
{
:generate
=>
false
}
self
.
class
.
class_eval
<<-
end_eval
self
.
class
.
class_eval
(
<<-
end_eval
,
__FILE__
,
__LINE__
+
1
)
class WithOptionsGenerator < Rails::Generators::Base
class_option :generate, :default => true
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录