Skip to content

Commit

Permalink
Adds compatibility for Ruby 2.1.x
Browse files Browse the repository at this point in the history
Changes KLASS_OF macro which wasn't compatible with the new Ruby
version.

Fixes #22
  • Loading branch information
gilles-leblanc committed Jun 29, 2014
1 parent f727c0e commit a3f16c6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*29/6/14 version 0.4.4
* added support for Ruby 2.1.x
*22/2/11 version 0.3.5
* added :source, :dest, :source_with_alpha, :dest_with_alpha options to
:alpha_blend
Expand Down
2 changes: 1 addition & 1 deletion ext/texplay/bindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ m_clone_image(VALUE self)
cloned_image = m_dup_image(self);

/* the main diff b/w clone and dup is that clone also dups the singleton */
KLASS_OF(cloned_image) = rb_singleton_class_clone(self);
rb_obj_reveal(cloned_image, rb_singleton_class_clone(self));

return cloned_image;
}
Expand Down
4 changes: 0 additions & 4 deletions ext/texplay/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@
# define RCLASS_IV_TBL(c) (RCLASS(c)->iv_tbl)
#endif

/* a useful macro. cannot use ordinary CLASS_OF as it does not return an lvalue */
#define KLASS_OF(c) (RBASIC(c)->klass)


#endif
2 changes: 1 addition & 1 deletion lib/texplay/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module TexPlay
VERSION = "0.4.3"
VERSION = "0.4.4"
end

0 comments on commit a3f16c6

Please sign in to comment.