From c7851266b6f9c54f7a0c8165105577dfd5915d24 Mon Sep 17 00:00:00 2001 From: Tom Black Date: Wed, 22 Feb 2017 01:51:53 -0500 Subject: `extend` rather than `include` the DSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that DSL methods aren’t added to every `Object` --- lib/ruby2d.rb | 2 +- test/dsl_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ruby2d.rb b/lib/ruby2d.rb index 4be4f39..f77d5f7 100644 --- a/lib/ruby2d.rb +++ b/lib/ruby2d.rb @@ -16,5 +16,5 @@ require 'ruby2d/sound' require 'ruby2d/music' require 'ruby2d/ruby2d' # load native extension -include Ruby2D::DSL include Ruby2D +extend Ruby2D::DSL diff --git a/test/dsl_spec.rb b/test/dsl_spec.rb index 6d3d8b4..522b29e 100644 --- a/test/dsl_spec.rb +++ b/test/dsl_spec.rb @@ -1,4 +1,5 @@ require 'ruby2d' +include Ruby2D::DSL RSpec.describe Ruby2D::DSL do -- cgit v1.2.3