lib/plc/emulator/emu_plc.rb in ladder_drive-0.6.0 vs lib/plc/emulator/emu_plc.rb in ladder_drive-0.6.1

- old
+ new

@@ -61,10 +61,11 @@ SUFFIXES.each do |k| eval "@#{k}_devices = []" end @lock = Mutex.new @config = config + @pending_save = nil reset load_plugins end def device_by_name name @@ -339,15 +340,15 @@ end values = [] (SIZE_OF_BIT_STACK - 1).downto 0 do |i| values << stack_device(i).word end - v = values.pop + value = values.pop values.each_with_index do |v, i| stack_device(i).word = v end stack_count_device.word -= 1 - v + value end # ---------------- def sync_input @lock.synchronize {