File: true_class.rb

package info (click to toggle)
ruby-net-ldap 0.19.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: ruby: 4,583; sh: 53; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
# -*- ruby encoding: utf-8 -*-
##
# BER extensions to +true+.
module Net::BER::Extensions::TrueClass
  ##
  # Converts +true+ to the BER wireline representation of +true+.
  def to_ber
    # http://tools.ietf.org/html/rfc4511#section-5.1
    "\001\001\xFF".force_encoding("ASCII-8BIT")
  end
end