Calling #clone on certain classes such as Sprite or Window should raise TypeError #17

Open
opened 2014-02-03 00:27:34 +00:00 by Ancurio · 1 comment
Ancurio commented 2014-02-03 00:27:34 +00:00 (Migrated from github.com)

Need to compile a list of these classes first.

Exception message: "can't clone "

Need to compile a list of these classes first. Exception message: "can't clone <Class>"
ReinUsesLisp commented 2018-02-23 08:03:58 +00:00 (Migrated from github.com)

From RGSS1 (Ruby built-in classes were excluded): Plane, Sprite, Tilemap, Window, RPG::Sprite and Viewport raise TypeError.

RPG::Troop raises NameError in mkxp while in Game.exe is clonable.

Extraction method (using runtime scripts):

$string = ""
def test(klass, *args)
  $string += "#{klass}: "
  object = klass.new(*args)
  object.clone
  $string += "Clonable\n"
rescue => ex
  $string += "#{ex.class.to_s}\n"
end

test(Viewport, 0, 0, 1, 1)
test(Bitmap, 1, 1)
# ...

file = File.open($MKXP ? "output-mkxp" : "output-wine", "wb")
file.write($string)
file.close

Then just $ diff output-mkxp output-wine

I can't check RGSS2 and 3 right now, but this method should work too.

From RGSS1 (Ruby built-in classes were excluded): Plane, Sprite, Tilemap, Window, RPG::Sprite and Viewport raise TypeError. RPG::Troop raises NameError in mkxp while in Game.exe is clonable. Extraction method (using runtime scripts): ```ruby $string = "" def test(klass, *args) $string += "#{klass}: " object = klass.new(*args) object.clone $string += "Clonable\n" rescue => ex $string += "#{ex.class.to_s}\n" end test(Viewport, 0, 0, 1, 1) test(Bitmap, 1, 1) # ... file = File.open($MKXP ? "output-mkxp" : "output-wine", "wb") file.write($string) file.close ``` Then just `$ diff output-mkxp output-wine` I can't check RGSS2 and 3 right now, but this method should work too.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#17
No description provided.