Skip to content

Commit

Permalink
Fixed load/dump aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
t3hk0d3 committed Mar 23, 2013
1 parent c091d01 commit 43bdf40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ext/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ void Init_snappy()
VALUE rb_mSnappy_singleton = rb_singleton_class(rb_mSnappy);

rb_define_alias(rb_mSnappy_singleton, "compress", "deflate");
rb_define_alias(rb_mSnappy_singleton, "load", "deflate");
rb_define_alias(rb_mSnappy_singleton, "dump", "deflate");

rb_define_alias(rb_mSnappy_singleton, "uncompress", "inflate");
rb_define_alias(rb_mSnappy_singleton, "dump", "inflate");
rb_define_alias(rb_mSnappy_singleton, "load", "inflate");

rb_require("snappy/writer");
rb_require("snappy/reader");
Expand Down
2 changes: 1 addition & 1 deletion test/test-snappy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[
[:deflate, :inflate],
[:compress, :uncompress],
[:load, :dump],
[:dump, :load],
].each do |(i, o)|
Snappy.__send__(o, (Snappy.__send__ i, s)).must_equal(s)
eval %{Snappy.#{o}(Snappy.#{i} s).must_equal(s)}
Expand Down

0 comments on commit 43bdf40

Please sign in to comment.