Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
kputnam committed Jul 22, 2019
1 parent a908f9d commit c236364
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions lib/ruby/module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def #{name}(*args, &block)
optionals = []

triples = method.parameters.map do |k, n|
n ||= new_names.succ! # Get a fresh name if needed
n ||= (new_names.succ!).dup # Get a fresh name if needed

case k
when :req then [n, n, n] # def foo(x)
when :keyreq then [n, n, "#{n}:#{n}"] # def foo(x:)
Expand Down Expand Up @@ -177,12 +178,12 @@ def emit_call(receiver, name, arg_names, arguments, optionals, state)
end

def emit_args(arg_names, arguments, optionals, state)
arg_names.inject([]) do |args, name|
arg_names.inject([]) do |xs, name|
if k = optionals.index(name)
args << arguments[name] if state[k].zero?
xs << arguments[name] if state[k].zero?
else
args << arguments[name]
end; args
xs << arguments[name]
end; xs
end.join(", ")
end
end
Expand Down
3 changes: 2 additions & 1 deletion lib/stupidedi/reader/pointer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ class StringPtr < Pointer
# @group Conversion Methods
#########################################################################

def_delegators :reify, :to_sym, :intern, :to_i, :to_d
def_delegators :reify, :to_sym, :intern, :to_i, type: String
def_delegators :reify, :to_d

# This is called implicitly when we are used in String interpolation,
# eg `"abc #{pointer} xyz"` or `"abc %s xyz" % pointer`.
Expand Down

0 comments on commit c236364

Please sign in to comment.