Well, I like to edit some scripts and I began to understand a little of ruby, though I don't know much. But here's what I know:
First, the more scripts you have, the more lag you get. That's probably because even if it isn't a valid Scene, the Interpreter has to check that script anyways. So use only the scripts you really need. (mainly for scripts that have update and alias command)
Second, Anti Lag is good, but it works by disabling updates of events that aren't on line of sight. So if you have an event that happens on the other side of the map, you'll have trouble. There's a script called "Event Spawner". Using a single event, on the script tag, you can create as many other events as you want, but you will have to write everything.
However, there will be almost no lag caused by events.
Third, I believe that the RPG Maker doesn't have the proper structure to handle much information. For example, I have GTA in my computer and I finished the game with almost no lag. But in RPG Maker, when I try to use an animation with many frames, the game crashes! So if you put too many resources in your game, you'll also get more lag.
About that problem you asked, I think it should be like this:
case @
when 1..4
p 'example'
end
don't know if will work though
These are just my opinion, I may be wrong, but I hope to be of help.
See ya!