LUA -- combining redis.status_reply() with string.gsub() produces ERROR

Hello, I am new to Redis and Lua and my google searches for the following error returned some C source code for Redis-scripting, but I have little experience with C as well. The first two CLI commands below work as expected. But in the third command where I combine the first two commands it produces an error. I tried string.gsub(‘some text’,’ ‘,’’)[0] and string.gsub(‘some text’,’ ‘,’’)[1] with no better results – hoping this is just a newbie question with an easy fix.

127.0.0.1:6379> EVAL "return redis.status_reply('some text')" 0
some text

127.0.0.1:6379> EVAL "return string.gsub('some text',' ','')" 0
"sometext"

127.0.0.1:6379> EVAL "return redis.status_reply(string.gsub('some text',' ',''))" 0
(error) @user_script: 1: wrong number or type of arguments

Thanks,
George

I figured out a solution, just add two periods and an empty string after the gsub function:

127.0.0.1:6379> EVAL "return redis.status_reply(string.gsub('some text',' ','')..'')" 0
sometext