Sha256: 9966b055bb8be740e24c5ae75396780a236977ebd757df009ca118e5af75d72c

Contents?: true

Size: 383 Bytes

Versions: 41

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

# Extend `Language.transform` to inject `using RubyNext` to every file
RubyNext::Language.singleton_class.prepend(Module.new do
  def transform(contents, using: true, **hargs)
    # We cannot activate refinements in eval
    new_contents = RubyNext::Core.inject!(contents) if using
    super(new_contents || contents, using: using, **hargs)
  end
end)

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
ruby-next-core-1.1.0 lib/ruby-next/core/runtime.rb
ruby-next-core-1.0.3 lib/ruby-next/core/runtime.rb
ruby-next-core-1.0.2 lib/ruby-next/core/runtime.rb
ruby-next-core-1.0.1 lib/ruby-next/core/runtime.rb
ruby-next-core-1.0.0 lib/ruby-next/core/runtime.rb
ruby-next-core-1.0.0.rc.1 lib/ruby-next/core/runtime.rb
ruby-next-core-0.15.3 lib/ruby-next/core/runtime.rb
ruby-next-core-0.15.2 lib/ruby-next/core/runtime.rb
ruby-next-core-0.15.1 lib/ruby-next/core/runtime.rb
ruby-next-core-0.15.0 lib/ruby-next/core/runtime.rb
ruby-next-core-0.14.1 lib/ruby-next/core/runtime.rb
ruby-next-core-0.14.0 lib/ruby-next/core/runtime.rb
ruby-next-core-0.13.3 lib/ruby-next/core/runtime.rb
ruby-next-core-0.13.2 lib/ruby-next/core/runtime.rb
ruby-next-core-0.13.1 lib/ruby-next/core/runtime.rb
ruby-next-core-0.13.0 lib/ruby-next/core/runtime.rb
ruby-next-core-0.12.0 lib/ruby-next/core/runtime.rb
ruby-next-core-0.11.1 lib/ruby-next/core/runtime.rb
ruby-next-core-0.11.0 lib/ruby-next/core/runtime.rb
ruby-next-core-0.10.5 lib/ruby-next/core/runtime.rb