Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.date(nil) gives an error instead of acting like os.date() #417

Open
2 tasks done
technomancy opened this issue Nov 23, 2022 · 0 comments · May be fixed by #420
Open
2 tasks done

os.date(nil) gives an error instead of acting like os.date() #417

technomancy opened this issue Nov 23, 2022 · 0 comments · May be fixed by #420

Comments

@technomancy
Copy link

  • GopherLua is a Lua5.1 implementation. You should be familiar with Lua programming language. Have you read Lua 5.1 reference manual carefully?
  • GopherLua is a Lua5.1 implementation. In Lua, to keep it simple, it is more important to remove functionalities rather than to add functionalities unlike other languages . If you are going to introduce some new cool functionalities into the GopherLua code base and the functionalities can be implemented by existing APIs, It should be implemented as a library.

Please answer the following before submitting your issue:

  1. What version of GopherLua are you using? : latest from git master
  2. What version of Go are you using? : 1.19.3
  3. What operating system and processor architecture are you using? : Debian stable on amd64
  4. What did you do? : I ran print(os.date(nil))
  5. What did you expect to see? : the same thing as if I had run print(os.date())
  6. What did you see instead? : <string>:1: bad argument #1 to date (string expected, got nil)

Very minor issue but I thought I'd get it tracked here just for the record.

cezarguimaraes added a commit to cezarguimaraes/gopher-lua that referenced this issue Dec 13, 2022
cezarguimaraes added a commit to cezarguimaraes/gopher-lua that referenced this issue Dec 13, 2022
@cezarguimaraes cezarguimaraes linked a pull request Dec 13, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant