-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
755f7c0
commit 75659d0
Showing
5 changed files
with
16 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
# 実位置引数の数が仮位置引数より1個少ない | ||
# 実引数に1個以上のキーワード引数がある | ||
# calleeの仮引数にキーワード引数がない | ||
|
||
def f(a, b) | ||
"a:#{a} b:#{b}" | ||
class Foo | ||
def foo(x) | ||
x * 100 | ||
end | ||
end | ||
|
||
10.times do | ||
puts f("a", x:100, y:200) | ||
end | ||
#def f | ||
# yield 1,2,3,x:100,y:200 | ||
#end | ||
# | ||
#f do |a,b,*c| puts "a:#{a} b:#{b} c:#{c}" end | ||
x = [[0,1,2,3]] * 20 | ||
x << Foo.new.method(:foo) | ||
x.each do |a| | ||
puts a[2] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters