summaryrefslogtreecommitdiff
path: root/prelude.rb
blob: be249af7511066de49423c6bbb2eaf62326c98cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class << Thread
  # call-seq:
  #    Thread.exclusive { block }   -> obj
  #
  # Wraps the block in a single, VM-global Mutex.synchronize, returning the
  # value of the block. A thread executing inside the exclusive section will
  # only block other threads which also use the Thread.exclusive mechanism.
  def exclusive(&block) end if false
  mutex = Mutex.new # :nodoc:
  define_method(:exclusive) do |&block|
    warn "Thread.exclusive is deprecated, use Thread::Mutex", uplevel: 1
    mutex.synchronize(&block)
  end
end

class Binding
  # :nodoc:
  def irb
    require 'irb'
    irb
  end

  # suppress redefinition warning
  alias irb irb # :nodoc:
end

module Kernel
  def pp(*objs)
    require 'pp'
    pp(*objs)
  end

  # suppress redefinition warning
  alias pp pp # :nodoc:

  private :pp
end
pan>[DOC] Move rdoc of Integer#abs to numeric.rb [ci skip]Nobuyoshi Nakada 2021-06-04Improve perfomance for Integer#size method [Feature #17135] (#3476)S.H * Improve perfomance for Integer#size method [Feature #17135] * re-run ci * Let MJIT frame skip work for Integer#size Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> Notes: Merged-By: k0kubun <takashikkbn@gmail.com> 2021-03-04Strip trailing spaces [ci skip]Nobuyoshi Nakada 2021-02-19Improve performance some Numeric methods [Feature #17632] (#4190)S.H Notes: Merged-By: k0kubun <takashikkbn@gmail.com> 2021-02-08Improve performance Float#positive? and Float#negative? [Feature #17614] (#4160)S.H Notes: Merged-By: k0kubun <takashikkbn@gmail.com> 2021-01-18Fix JIT link failuresTakashi Kokubun forgotten in https://github.com/ruby/ruby/pull/4018 2021-01-01Improve performance some Float methods [Feature #17498] (#4018)S.H Notes: Merged-By: k0kubun <takashikkbn@gmail.com>