Ruby Console.... what's up with all the <br/>s?
-
@thomthom said:
Maybe you're gotten a plugin being naughty and editing base methods...
Not a chance!! No way, no how - not on this machine.
-
Have you got the latest version? it's a known problem but alex (the person who extended it) said he was looking in to a fix.
-
@remus said:
Have you got the latest version? it's a known problem but alex (the person who extended it) said he was looking in to a fix.
I was under the impression that Todd was referring to the native Sketchup Ruby Console - not the Webdialog version. ..or..?
-
I am referring to the native Ruby console.
-
@unknownuser said:
I figured it out, and it's a SU bug. When you have a 0x0a in your string, and you
putsthat string to the console, you'll get a <br/> instead of a newline.This is very odd.
0x0ais the new line character\n- that appear all the time in strings. Not seen this in my PC - and I can't remember seeing it when debugging on my old MacMini. -
Here's a console recreate:
` > abc = "Hi\nthere"
Hi
thereputs abc
Hi<br/>there
nil` -
I'd keep looking for a plugin - one with a WebDialog, one that has redefined
puts, or modified theStringclass, or uses gsub('\n','<br/>') maybe. -
I found it. It is indeed some Google provided SU Ruby code on my machine, and it is doing exactly what Jim coded. I do not know, however, if the code I have is generally available code, and, it certainly (IMHO) should not be interfering with the Ruby Console.
So, SU Bug? Yes.
Will it impact anyone else - I don't know yet. I'm asking Google.
Thanks.
(So, since it IS a SU Bug, do I have to eat my words "no way, no how - not this machine"????
) -
What Google code is it?
Windows session:
` > abc = "Hi\nthere"
Hi
thereputs abc
Hi
there
nil` -
I'm running the latest SU Pro on a Mac. I think I did bypass an update-gram the other day, so I might not be on the latest.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement