Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Commit

Permalink
Replace Fixnum by Integer, closes gh-40
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Mar 14, 2018
1 parent 1d4e15c commit 8edf8ee
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
= rufus-lua CHANGELOG.txt


== rufus-lua - 1.1.4 not yet released

- Replace deprecated Fixnum by Integer, gh-40


== rufus-lua - 1.1.3 released 2016/08/21

- respect non-ascii eval input sources (Andri Möll)
Expand Down
1 change: 1 addition & 0 deletions CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Nathanael Jones https://github.com/nathanaeljones

== feedback

Chad Simmons https://github.com/polpak, gh-40
Stas Ukolov https://github.com/ukoloff


Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
PATH
remote: .
specs:
rufus-lua (1.1.3)
rufus-lua (1.1.4)
ffi (~> 1.9)

GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
ffi (1.9.14)
ffi (1.9.18)
rspec (3.0.0)
rspec-core (~> 3.0.0)
rspec-expectations (~> 3.0.0)
Expand All @@ -30,4 +30,4 @@ DEPENDENCIES
rufus-lua!

BUNDLED WITH
1.10.6
1.15.4
2 changes: 1 addition & 1 deletion lib/rufus/lua/state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def stack_push(o)
when TrueClass then Lib.lua_pushboolean(@pointer, 1)
when FalseClass then Lib.lua_pushboolean(@pointer, 0)

when Fixnum then Lib.lua_pushinteger(@pointer, o)
when Integer then Lib.lua_pushinteger(@pointer, o)
when Float then Lib.lua_pushnumber(@pointer, o)

when String then Lib.lua_pushlstring(@pointer, o, o.bytesize)
Expand Down
28 changes: 14 additions & 14 deletions lib/rufus/lua/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ def self.to_lua_s(o)

case o

when String then o.inspect
when Fixnum then o.to_s
when Float then o.to_s
when TrueClass then o.to_s
when FalseClass then o.to_s
when NilClass then 'nil'

when Hash then to_lua_table_s(o)
when Array then to_lua_table_s(o)

else raise(
ArgumentError.new(
"don't how to turning into a Lua string representation "+
"Ruby instances of class '#{o.class}'"))
when String then o.inspect
when Integer then o.to_s
when Float then o.to_s
when TrueClass then o.to_s
when FalseClass then o.to_s
when NilClass then 'nil'

when Hash then to_lua_table_s(o)
when Array then to_lua_table_s(o)

else fail(
ArgumentError.new(
"don't how to turning into a Lua string representation "+
"Ruby instances of class '#{o.class}'"))
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rufus/lua/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
module Rufus
module Lua

VERSION = '1.1.3'
VERSION = '1.1.4'
end
end

0 comments on commit 8edf8ee

Please sign in to comment.