Skip to content

Commit 0434b56

Browse files
committed
fix formatting in import_methods_spec
1 parent dc3c05f commit 0434b56

File tree

2 files changed

+16
-18
lines changed

2 files changed

+16
-18
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ Bug fixes:
4646
* Fix `Monitor#exit` to raise `ThreadError` when monitor not owned by the current thread (#2922, @andrykonchin).
4747
* Fix `MatchData#[]` to support negative `length` argument (#2929, @andrykonchin).
4848
* Fix `IO` line reading calls when using a multi-byte delimiter (`IO#{each,gets,readline,readlines,etc.}) (#2961, @vinistock, @nirvdrum).
49-
* Fix `Refinement#import_methods` to supports module methods with super (#2971, @horakivo).
5049

5150
Compatibility:
5251

spec/ruby/core/refinement/import_methods_spec.rb

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def indent(level)
125125
suppress_warning { import_methods RefinementSpec::ModuleWithAncestors }
126126
end
127127

128-
129128
using self
130129
-> {
131130
"foo".indent(3)
@@ -134,26 +133,26 @@ def indent(level)
134133
end
135134

136135
it "doesn't import any methods if one of the arguments is not a module" do
137-
str_utils = Module.new do
138-
def indent(level)
139-
" " * level + self
140-
end
141-
end
142-
143-
string_refined = Module.new do
144-
refine String do
145-
-> {
146-
import_methods str_utils, Integer
147-
}.should raise_error(TypeError)
148-
end
136+
str_utils = Module.new do
137+
def indent(level)
138+
" " * level + self
149139
end
140+
end
150141

151-
Module.new do
152-
using string_refined
142+
string_refined = Module.new do
143+
refine String do
153144
-> {
154-
"foo".indent(3)
155-
}.should raise_error(NoMethodError)
145+
import_methods str_utils, Integer
146+
}.should raise_error(TypeError)
156147
end
148+
end
149+
150+
Module.new do
151+
using string_refined
152+
-> {
153+
"foo".indent(3)
154+
}.should raise_error(NoMethodError)
155+
end
157156
end
158157

159158
it "imports methods from multiple modules so that methods see other's module's methods" do

0 commit comments

Comments
 (0)