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

added luajit support #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

added luajit support #40

wants to merge 2 commits into from

Conversation

dodo
Copy link

@dodo dodo commented Feb 24, 2015

the pretty_print plugins was constantly failing for me when trying to print _G in luajit.

I know the bugfix is not pretty, but works for everything.

What do you think?

@hoelzro
Copy link
Owner

hoelzro commented Feb 24, 2015

@dodo Thanks for the submission; I think I'd better think of a more general way of solving this.

@hoelzro
Copy link
Owner

hoelzro commented Feb 25, 2015

@dodo I've added support in the master branch; please test with that change and let me know if it works!

@@ -110,7 +111,7 @@ local function cross_type_order(a, b)
local pos_b = type_order[ type(b) ]

if pos_a == pos_b then
return a < b
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't working in luajit for me.

$ luajit
> r = require'repl.console'
> r:loadplugin'pretty_print'
> r:run()
> f = {}
> f[pairs] = 23
> f[ipairs] = 42
> return f
/usr/local/share/lua/5.1/repl/plugins/pretty_print.lua:114: attempt to compare two function values

@hoelzro
Copy link
Owner

hoelzro commented Mar 3, 2015

See #41

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 this pull request may close these issues.

2 participants