make machine init default to the running one with ruby config
This commit is contained in:
parent
500bc36a29
commit
9c609ee299
@ -20,8 +20,11 @@ module Vm
|
|||||||
|
|
||||||
# Initialize with a string for cpu. Naming conventions are: for Machine XXX there exists a module XXX
|
# Initialize with a string for cpu. Naming conventions are: for Machine XXX there exists a module XXX
|
||||||
# with a XXXMachine in it that derives from Vm::Machine
|
# with a XXXMachine in it that derives from Vm::Machine
|
||||||
def initialize machine
|
def initialize machine = nil
|
||||||
super("start")
|
super("start")
|
||||||
|
machine = RbConfig::CONFIG["host_cpu"] unless machine
|
||||||
|
machine = "intel" if machine == "x86_64"
|
||||||
|
machine = machine.capitalize
|
||||||
Machine.instance = eval("#{machine}::#{machine}Machine").new
|
Machine.instance = eval("#{machine}::#{machine}Machine").new
|
||||||
@context = Context.new(self)
|
@context = Context.new(self)
|
||||||
#global objects (data)
|
#global objects (data)
|
||||||
|
Loading…
Reference in New Issue
Block a user