Skip to content

Commit

Permalink
adapt to changes in y2r for references
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed May 7, 2013
1 parent 136ea96 commit 9ba2537
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/binary/Y2RubyTypeConv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ rbvalue_2_ycpvalue( VALUE value )
{
return rbterm_2_ycpterm(value);
}
else if ( !strcmp(class_name, "YCP::Reference"))
else if ( !strcmp(class_name, "YCP::FunRef"))
{
return rbreference_2_ycpreference(value);
}
Expand Down
13 changes: 10 additions & 3 deletions src/ruby/ycp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
require 'ycpx'

# load inside moduls
require "ycp/arg_ref"
require "ycp/break"
require "ycp/builtins"
require "ycp/convert"
require "ycp/exportable"
require "ycp/external"
require "ycp/fun_ref"
require "ycp/i18n"
require "ycp/logger"
require "ycp/ops"
require "ycp/path"
require "ycp/reference"
require "ycp/scr"
require "ycp/term"
require "ycp/wfm"
Expand All @@ -41,9 +42,15 @@ module YCP
def term(*args)
return Term.new *args
end
def reference(*args)
return Reference.new *args

def fun_ref(*args)
return FunRef.new *args
end

def arg_ref(*args)
return ArgRef.new *args
end

def path(*args)
return Path.new *args
end
Expand Down
10 changes: 10 additions & 0 deletions src/ruby/ycp/arg_reg.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module YCP
class ArgRef
attr_accessor :value

def initialize initial=nil
@value = initial
end

end
end
9 changes: 9 additions & 0 deletions src/ruby/ycp/external.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module YCP
class External
attr_reader :magic

def initialize (magic)
@magic = magic
end
end
end
2 changes: 1 addition & 1 deletion src/ruby/ycp/reference.rb → src/ruby/ycp/fun_ref.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module YCP
class Reference
class FunRef
attr_reader :signature

def initialize met, signature
Expand Down

0 comments on commit 9ba2537

Please sign in to comment.