Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DRVTiny/crystal-redis int…
Browse files Browse the repository at this point in the history
…o DRVTiny-master
  • Loading branch information
Stefan Wille committed Dec 28, 2019
2 parents 3ca4129 + 2cb2803 commit 8195e8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/redis/commands.cr
Original file line number Diff line number Diff line change
Expand Up @@ -1478,15 +1478,15 @@ class Redis
# redis.eval("return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", ["key1", "key2"], ["first art", "second arg"])
# ```
def eval(script : String, keys = [] of RedisValue, args = [] of RedisValue)
string_array_command(concat(["EVAL", script, keys.size.to_s], keys, args))
string_array_or_integer_command(concat(["EVAL", script, keys.size.to_s], keys, args))
end

# EVAL and EVALSHA are used to evaluate scripts using the Lua interpreter
# built into Redis starting from version 2.6.0.
#
# **Return value**: Array(String), depends on the executed script
def evalsha(sha1, keys = [] of RedisValue, args = [] of RedisValue)
string_array_command(concat(["EVALSHA", sha1.to_s, keys.size.to_s], keys, args))
string_array_or_integer_command(concat(["EVALSHA", sha1.to_s, keys.size.to_s], keys, args))
end

# Load a script into the scripts cache, without executing it.
Expand Down

0 comments on commit 8195e8a

Please sign in to comment.